Importance of MongoDB Index Selection

In an online business, IOPS usage of 100% is frequent (4000 IOPS per second), each lasting nearly 1 hour. Log discovery from slow requests takes 1 hour to make a getMore request, resulting in high IOPS; after further investigation, it is finally found that this is an index selection problem. 2017-11-01T15:04:17.498+0800 I COMMAND [conn5735095 ...

Posted by chodges on Sat, 18 May 2019 21:45:16 +0200

Deploying fragmented clusters using keyfile

Deploy Sharded Cluster with Keyfile Access Control 1. Create a configuration server replication set 1.1 Create database folders mkdir -p /configdb/{conf,data,log} 1.2 Generate keyfile file openssl rand -base64 756 > /db/conf/keyfile chmod 400 /db/conf/keyfile After generation, all nodes in the cluster use the ...

Posted by esfisher on Thu, 16 May 2019 10:52:31 +0200

Mongodb Cluster Construction under linux: Fragmentation + Replica Set

Three servers 192.168.1.40/41/42 Installation package mongodb-linux-x86_64-amazon 2-4.0.1.tgz Service planning Server 40 Server 41 Server 42  mongos  mongos  mongos  config server  config server  config server Shard server 1 master node Shard server 1 secondary node Shard server 1 arbitration Shard server 2 arbitration Shard server 2 ...

Posted by ja_blackburn on Wed, 15 May 2019 03:03:21 +0200

CentOS 7.4 builds a three-node replica cluster of MongoDB4.0 based on user authentication

mongoDB officials no longer recommend using master-slave mode. Instead, the replica set mode is adopted. click For example, So what is a replica set? World of Warcraft always talks about duplication, but in fact these two concepts have almost the same meaning. Duplicate in the game refers to players concentrating on a scene during rush hours ...

Posted by run2web on Sat, 11 May 2019 13:13:03 +0200

Taste MongoDB: Operations (2)

Catalog 4. Update data 4. Update data (1)update() In MongoDB, update() functions can be used to perform data update operations. The function takes three main parameters: criteria, objNew and option. The parameter criteria can be used to specify a query that selects the target record to be updated. Use the objNew parameter t ...

Posted by jrschwartz on Fri, 10 May 2019 20:54:09 +0200

AOP Unified Printing Log of SpringBoot 2.X Kotlin Series

In development projects, we often need to print logs, so that developers can understand the interface invocation and locate errors. In many cases, we need to print logs for the entry and exit of Controller or Service, but we do not want to use logger printing in each method repeatedly. At this time, we hope to have a unified manager to print. ...

Posted by baronmask on Thu, 09 May 2019 06:39:05 +0200