sharding

RavenDB - Planning for scalability

送分小仙女□ 提交于 2019-12-05 03:40:13
I have been learning RavenDB recently and would like to put it to use. I was wondering what advice or suggestions people had around building the system in a way that is ready to scale, specifically sharding the data across servers, but that can start on a single server and only grow as needed. Is it advisable, or even possible, to create multiple databases on a single instance and implement sharding across them. Then to scale it would simply be a matter of spreading these databases across the machines? My first impression is that this approach would work, but I would be interested to hear the

MongoDB replica heartbeat request time exceeded

泄露秘密 提交于 2019-12-05 00:11:32
问题 I have replica set (hosted on amazon) which has: primary secondary arbiter All of them are version 3.2.6 and this replica is making one shard in my sharded cluster (if that is important although I think it is not). When I type rs.status() on primary it says that cannot reach secondary (the same thing is on arbiter): { "_id" : 1, "name" : "secondary-ip:27017", "health" : 0, "state" : 8, "stateStr" : "(not reachable/healthy)", "uptime" : 0, "optime" : { "ts" : Timestamp(0, 0), "t" : NumberLong(

使用YCSB测试mongodb分片集群性能

旧街凉风 提交于 2019-12-04 21:24:47
1. 测试工具 本次测试选取YCSB(Yahoo! Cloud System Benchmark)作为测试客户端工具。YCSB是Yahoo开源的一个nosql测试工具,用来测试比较各种nosql的性能,项目地址:https://github.com/brianfrankcooper/YCSB。项目的mongodb目录下有详细的安装和测试方法。 YCSB支持常见的nosql数据库读写,如插入,修改,删除,读取等。它可以使用多线程来提高客户端的性能。可以方便的自定义各种场景,如95%插入5%读,或者90%读5%更新5%插入等等。可以自定义数据请求分布方式:平均分布,zipfian(大约20%数据获得80%访问请求),最新数据。 2. 测试步骤 1. 选择客户端线程数。使用YCSB测试,要选择一个合适的线程数,否则测试的瓶颈可能在客户端而不是数据库,经过比较,大概100个线程时,YCSB达到最大性能。 2.定义测试场景。本次测试的场景如下: workloada 写多读少,90%插入,5%读,5%更新。 workloadb 读多写少,95%读,5%更新。 workloadc 读多写少,100%读。 workloadd 读多写少,95%读,5%插入。 workloadf 读多写少,50%读,50%读写修改同一条记录。 workloadg 读多写少,60%读,20%读,20%更新。 3

MongoDB: can't shard on localhost because of shard socket exception

一个人想着一个人 提交于 2019-12-04 19:41:36
I'm trying the MongoDB's shard tutorial , for some simple testing (proof-of-concept project). I want to try sharding on a single machine. Is this possible and/or does it make any sense? When I follow the guide steps, it does not work. First, I start the mongod configsrv database instances on my machine: bin/mongod --configsvr --dbpath $BASEDIR/data/configdb --port 27019 & bin/mongod --configsvr --dbpath $BASEDIR/data/configdb1 --port 27020 & bin/mongod --configsvr --dbpath $BASEDIR/data/configdb2 --port 27021 & Then, I start the mongos instances so that they "bind" to the config servers: HOST=

Application-level JOIN with WHERE and ORDER BY on N postgresql shards

故事扮演 提交于 2019-12-04 19:13:14
I have a postgresql cluster with different tables residing within different shards (different physical postgresql servers). EG: shard A + user_group (user_group_id, user_group_name) shard B + user (user_id, user_group_id (NULL), user_name) shard C + comment (comment_id, user_id, comment_content) I need to run queries that if all 3 tables where on the same shard, it would look something like: SELECT comment_id, comment_content FROM comment INNER JOIN user ON comment.user_id = user.user_id LEFT JOIN user_group ON user.user_group_id = user_group.user_group_id WHERE user_group_id > 10 AND user

Mongodb: db.printShardingStatus() / sh.status() call in Java (and JavaScript)

蓝咒 提交于 2019-12-04 17:43:15
I need to get a list of chunks after sharding inside my Java code. My code is simple and looks like this: Mongo m = new Mongo( "localhost" , 27017 ); DB db = m.getDB( "admin" ); Object cr = db.eval("db.printShardingStatus()", 1); A call of eval() returns an error: Exception in thread "main" com.mongodb.CommandResult$CommandFailure: command failed [$eval]: { "serverUsed" : "localhost/127.0.0.1:27017" , "errno" : -3.0 , "errmsg" : "invoke failed: JS Error: ReferenceError: printShardingStatus is not defined src/mongo/shell/db.js:891" , "ok" : 0.0} at com.mongodb.CommandResult.getException

moveChunk failed to engage TO-shard in the data transfer: can't accept new chunks because

不打扰是莪最后的温柔 提交于 2019-12-04 08:32:55
问题 I have a MongoDb production cluster running 2.6.5 that I recently migrated from two to three shards. I had been running as two shards for about a year. Each shard is a 3-server replica set and I have one collection sharded. The sharded collection is about 240G, and with the new shard I now have evenly distributed chunks of 2922 on each shard. My production environment appears to be performing just fine. There is no problem accessing data. [Note: 1461 should be the number of chunks moved from

removing “scanAndOrder” : true in my MongoDB query result

人盡茶涼 提交于 2019-12-04 08:07:36
So i have a collection in my db with the following shardkey : {cl:"yyyy-mm", user_id:N} when I perform the follow query db.collection.find({ cl:"2012-03", user_id:{$in:users}, _id:{"$lt":new ObjectId('4f788b54204cfa4946000044')} }).sort({_id:-1}).limit(5).explain(true) it gives me this result: "clusteredType" : "ParallelSort", "shards" : { "set1/hostname.com:27018" : [ { "cursor" : "BtreeCursor cl_1_user_id_1 multi", "nscanned" : 21294, "nscannedObjects" : 21288, "n" : 5, "scanAndOrder" : true, "millis" : 1258, "nYields" : 69, "nChunkSkips" : 0, "isMultiKey" : false, "indexOnly" : false,

How to define sharding range for each shard in Mongo?

感情迁移 提交于 2019-12-04 05:06:24
let say, the document is { x:Number } and I have 3 shards. Instead of autosharding, can I define specifically shard1 only contains data x<0, shard2 only contains data 0 =< x =< 1000 , and shard 3 is 1000 You can. It's possible to pre-split chunks manually, it's described here: http://www.mongodb.org/display/DOCS/Splitting+Chunks Think carefully about how you split your chunks. If you do it badly you can get lots of performance problems, but if you know enough about your keys you can gain a lot. If you do it you probably want to turn off the balancer: > use config > db.settings.update({_id:

Solr Cloud Document Routing

守給你的承諾、 提交于 2019-12-04 04:25:39
问题 Currently I have a zookeeper multi solr server, single shard setup. Unique ids are generated automatically by solr. I now have a zookeeper mult solr server, multi shard requirement. I need to be able to route updates to a specific shard. After reading http://searchhub.org/2013/06/13/solr-cloud-document-routing/ I am concerned that I cannot allow solr to generate random unique ids if I want to route updates to a specific shard. Cannot anyone confirm this for me and perhaps give an explanation