Skip to main content

Questions tagged [sharding]

Sharding is the practice of logically dividing or partitioning data, usually using a specific key (referred to as a shard key), and then placing that data on separate hosts (subsequently known as shards). This is generally done to scale horizontally (more hosts) as opposed to vertically (more powerful hosts) and can provide significant cost benefits, particularly with the now ubiquitous availability of cloud computing.

Filter by
Sorted by
Tagged with
4 votes
2 answers
10k views

How to Determine Chunk Distribution (data and number of docs) in a Sharded MongoDB Cluster?

Having done all the right things - picked an appropriate shard key, scaled horizontally, distributed my data across several shards, I find I now have no real way to determine how well balanced the ...
Adam C's user avatar
  • 9,245
7 votes
3 answers
4k views

Scaling out SQL Server and syncing data across multiple machines

I don't have expertise in architecting databases, and I've been teaching myself new stuff every day. I'd like to make an Internet-scale application using SQL Server as the data store. I haven't found ...
Mark13426's user avatar
  • 579
3 votes
1 answer
5k views

Removing Database from sharded cluster in Mongo DB

I Have a mongo shard db system with two shards and and three mongos servers.My application creates DB on daily basis as per our business requirements. We have some sharded collection in each day DB. ...
viren's user avatar
  • 511
3 votes
1 answer
752 views

GridFS: why can't I shard chunks with a hashed key?

There is a statement in the MongoDb documentation: You cannot use Hashed Sharding when sharding the chunks collection. It does not say that, but I guess it means that I can only use ranged ...
nagylzs's user avatar
  • 411
2 votes
1 answer
234 views

Mongodb sharded cluster backup user issue

We're using a simple python script to backup our mongodb cluster. the script connects to each mongod instance via ssh, and performs mongodump, all without requiring user/pass ever since we started ...
Meny Issakov's user avatar
2 votes
0 answers
127 views

Modulus calculation for compound primary keys in MySQL Cluster (and other sharded databases)

In MySQL Cluster, and generally in sharded databases, how is a compound primary key's modulus calculated? Say, for example, there are two tables that have primary keys like so: CREATE TABLE Orders (...
Juan Carlos Coto's user avatar
1 vote
1 answer
936 views

MongoDB Sharded Cluster: Balancing chunks not working, stuck at "step 2"

I've one collection enable sharding by id key on 2 shard rs01 and rs02 Today I added a new shard rs03 into cluster. I've checked balancer status by sh.status() as below: shards: { "_id" : "rs01"...
CSJ's user avatar
  • 155
1 vote
0 answers
110 views

adding documents to shard collection results in incorrect amount

I have added 2 shards to my cluster: sh.addShard("127.0.0.1:27023") { "shardAdded" : "shard0000", "ok" : 1, "operationTime" : Timestamp(1552115819, 4), "$clusterTime" : { "...
tom dinh's user avatar
0 votes
1 answer
2k views

Where to insert data after sharding?

Actual database in localhost:30000 ------------- I used this as Shard1 another mongod in localhost:30001 ------------- Shard2 another mongod in localhost:30002 ------------- Shard3 Added 1 ...
Praveen's user avatar
  • 121
0 votes
2 answers
365 views

Why does PostgreSQL FDW talk to multiple backend servers for this point query?

I've set up a PostgreSQL FDW server with the following table, sharded by user_id over four servers: CREATE TABLE my_big_table ( user_id bigint NOT NULL, serial bigint NOT NULL, -- ...
gertvdijk's user avatar
  • 227