Sharded pawg yog dab tsi?
Sharded pawg yog dab tsi?

Video: Sharded pawg yog dab tsi?

Video: Sharded pawg yog dab tsi?
Video: yog hmoov dab tsi tub huas xyooj 2024, Kaum ib hlis
Anonim

Ib MongoDB sharded pawg muaj cov nram qab no Cheebtsam: shard: Txhua shard muaj ib tug subset ntawm cov sharded cov ntaub ntawv. Raws li MongoDB 3.6, shards yuav tsum tau muab xa mus raws li cov txheej txheem replica. mongos: Lub mongos ua raws li cov lus nug router, muab kev sib txuas ntawm cov neeg siv khoom thiab cov sharded pawg.

Tom qab ntawd, ib tug kuj yuav nug, Sharded yog dab tsi?

Sharding yog ib hom database partitioning uas cais cov databases loj heev rau hauv me me, sai dua, yooj yim tswj qhov chaw hu ua cov ntaub ntawv shards. Lo lus shard txhais tau tias ib feem me me ntawm tag nrho.

Ib yam li ntawd, Sharded collection yog dab tsi? Sharding yog ib lub tswv yim hauv MongoDB, uas faib cov ntaub ntawv loj rau hauv cov ntaub ntawv me me hla ntau yam MongoDB. Cov sau uas tuaj yeem loj hauv qhov loj yog qhov sib cais ntawm ntau yam kev sau los yog Shards raws li lawv hu ua. Logically tag nrho cov shards ua hauj lwm raws li ib tug sau.

Ntawm no, Sharded pawg hauv MongoDB yog dab tsi?

A mongodb pawg yog lo lus feem ntau siv rau sharded pawg hauv mongodb . Lub hom phiaj tseem ceeb ntawm a sharded mongodb yog: Scale nyeem thiab sau nrog ntau lub pob. Txhua lub node tsis tuav tag nrho cov ntaub ntawv yog li koj tuaj yeem cais cov ntaub ntawv raws tag nrho cov nodes ntawm shard.

Vim li cas Sharding siv?

Sharding yog ib txoj kev ntawm kev faib thiab khaws cia ib qho kev sib tham hauv cov ntaub ntawv hauv ntau lub databases. Los ntawm kev faib cov ntaub ntawv ntawm ntau lub tshuab, ib pawg ntawm cov txheej txheem database tuaj yeem khaws cov ntaub ntawv loj dua thiab tuav cov kev thov ntxiv. Sharding Nws yog ib qho tsim nyog yog tias cov ntaub ntawv loj dhau los khaws cia rau hauv ib qho database.

Pom zoo: