Dab tsi yog qhov kev ua haujlwm tsis tu ncua hauv Redis?
Dab tsi yog qhov kev ua haujlwm tsis tu ncua hauv Redis?

Video: Dab tsi yog qhov kev ua haujlwm tsis tu ncua hauv Redis?

Video: Dab tsi yog qhov kev ua haujlwm tsis tu ncua hauv Redis?
Video: Qhov tseem ceeb ntawm kev thov Vajtswv yog dab tsi 1 2024, Kaum ib hlis
Anonim

Snapshoting. Redis snapshoting yog qhov yooj yim tshaj plaws Redis persistence hom . Nws tsim cov ntsiab lus hauv-lub sijhawm snapshots ntawm dataset thaum cov xwm txheej tshwj xeeb tau ntsib, piv txwv li yog tias lub snapshot yav dhau los tau tsim ntau dua 2 feeb dhau los thiab twb muaj tsawg kawg yog 100 sau ntawv tshiab, ib qho snapshot tshiab yog tsim.

Tsuas yog li ntawd, yog Redis pheej pheej los ntawm lub neej ntawd?

Redis tsis yog ib lub mos txwv nyiaj txawm nrog kev nyob ruaj khov Yog lawm, Redis yog tsis tu ncua tab sis vim nws lub cim xeeb txwv nws tsis yog rau txhua kis. Ua ntej, tsis yog txhua daim ntawv thov xav tau kev nkag tau sai. Qhov thib ob, nco yog kim.

Qhov thib ob, kuv yuav ua li cas kaw qhov kev pheej hmoo hauv Redis? Txhawm rau kaw tag nrho cov ntaub ntawv tsis tu ncua hauv Redis ua cov hauv qab no:

  1. Disable AOF los ntawm kev teeb tsa cov lus qhia ntxiv rau qhov tsis muaj (nws yog tus nqi qub)
  2. Disable RDB snapshotting los ntawm disabling (hais tawm) tag nrho cov configuration directives (muaj 3 uas yog txhais los ntawm lub neej ntawd)

Redis persistence yog dab tsi?

Redis Persistence . The RDB kev nyob ruaj khov ua point-in-time snapshots ntawm koj cov dataset ntawm cov ntu ntu. The AOF kev nyob ruaj khov logs txhua qhov kev sau ntawv tau txais los ntawm cov neeg rau zaub mov, uas yuav rov ua dua ntawm server startup, reconstructing thawj dataset.

Qhov chaw teeb tsa twg qhia txog cov ntaub ntawv uas RDB snapshot pob tseg tau khaws tseg rau?

pov tseg . rdb file yog lub neej ntawd ntaub ntawv uas redis yuav cawm cov ntaub ntawv rau disk yog tias koj qhib rdb ib raws persistence nyob rau hauv lub redis. conf ntaub ntawv . Hauv qhov no, nws yog qhov zoo dua kom tau txais nws los ntawm redis config los ntawm kev ua tiav cov lus txib hauv qab no.

Pom zoo: