Dab tsi yog replication hauv Redis?
Dab tsi yog replication hauv Redis?

Video: Dab tsi yog replication hauv Redis?

Video: Dab tsi yog replication hauv Redis?
Video: Leng Yang - Yog Vim Dab Tsi (Official Full Song | Nkauj Tawm Tshiab) 2020/05/24 2024, Hlis ntuj nqeg
Anonim

Rov ua dua . Redis replication yog ib qho yooj yim heev rau siv thiab teeb tsa tus tswv- qhev rov ua dua uas tso cai rau qhev Redis servers yuav tsum yog cov ntawv luam ntawm tus tswv servers. Cov hauv qab no yog qee qhov tseeb tseem ceeb heev txog Redis replication : Redis siv asynchronous rov ua dua . Rov ua dua kuj tsis thaiv ntawm tus qhev sab

Yog li ntawd, Redis yog dab tsi thiab nws ua haujlwm li cas?

Redis yog qhov chaw qhib (BSD daim ntawv tso cai), hauv-nco cov ntaub ntawv qauv khw, siv los ua database, cache thiab lus broker. Nws txhawb nqa cov ntaub ntawv xws li cov hlua, hashes, cov npe, teeb tsa, txheeb cov lus nug nrog ntau yam queries, bitmaps, hyperloglogs, geospatial indexes nrog lub vojvoog queries thiab ntws.

Ib tug kuj yuav nug, puas Redis txuag rau disk? Raws li lub neej ntawd Redis txuag snapshots ntawm dataset rau disk , hauv cov ntaub ntawv binary hu ua dump. Koj tuaj yeem teeb tsa Redis kom muaj cawm dataset txhua N vib nas this yog tias muaj tsawg kawg M hloov hauv dataset, lossis koj tuaj yeem hu rau tus kheej Txuag los yog BGSAV cov lus txib.

Tsis tas li ntawd, Redis node yog dab tsi?

Redis yog qhov ceev thiab muaj txiaj ntsig hauv-nco qhov tseem ceeb-tus nqi khw. Nws tseem hu ua cov ntaub ntawv qauv neeg rau zaub mov, vim tias cov yuam sij tuaj yeem muaj cov hlua, cov npe, teeb tsa, hashes thiab lwm yam ntaub ntawv qauv. Yog koj siv Node . js, koj tuaj yeem siv node_redis module los cuam tshuam nrog Redis.

Puas yog Redis synchronous?

Redis siv asynchronous replication los ntawm lub neej ntawd: Redis yog tsim los rau kev ua yeeb yam thiab qis, yooj yim rau kev twv, latency. Txawm li cas los xij yog tias ua tau nws yog qhov zoo rau lub kaw lus kom tuaj yeem hloov kho qhov kev lees paub nyob ntawm seb hom kev sau, yog li qee daim ntawv ntawm synchronous replication yuav ua ke txawm rau Redis.

Pom zoo: