Table of Contents[Hide][Show]
- 1. Koj txhais li cas los ntawm kev tsim qauv?
- 2. Dab tsi yog qhov tseem ceeb tshaj plaws ntawm tus tsim qauv?
- 3. Dab tsi yog CAP theorem?
- 4. Koj nkag siab dab tsi los ntawm kev ntsuas qhov load?
- 5. Qhov txawv ntawm asynchronous programming thiab parallel programming yog dab tsi?
- 6. Dab tsi yog qhov txawv ntawm kab rov tav thiab ntsug scaling?
- 7. Koj txhais li cas los ntawm latency, throughput, thiab system muaj?
- 8. ACID yog dab tsi?
- 9. Dab tsi yog sharding?
- 10. CDN yog dab tsi?
- 11. Vim li cas thiaj siv CDN?
- 12. Qhov sib txawv ntawm kev sib faib thiab kev faib tawm yog dab tsi?
- 13. Dab tsi yog caching?
- 14. CDN edge servers yog dab tsi?
- 15. Dab tsi yog qhov sib txawv Consistency qauv rau kev tsim qauv?
- 16. Koj txhais li cas los ntawm kev cia siab rau qhov zoo?
- 17. Koj txhais li cas los ntawm "kev xaiv tsa thawj coj"?
- 18. Koj txoj hauv kev yog dab tsi rau kev tsim TinyURL-zoo li URL shortening kev pab cuam?
- 19. Koj txoj hauv kev los tsim twitter yog dab tsi?
- 20. Tsim cov txheej txheem newsfeed rau Facebook
- 21. Dab tsi yog qhov system BASE khoom?
- 22. Dab tsi yog Load Balancing nrog IP Chaw Nyob Affinity Technique?
- 23. Dab tsi yog qhov Cache Hloov Hloov (lossis Txoj Cai Tawm Tsam Tawm) algorithms?
- 24. Koj txhais li cas los ntawm kev faib khoom?
- 25. Dab tsi yog kev tshaib plab?
- xaus
Ua ntej koj pib, peb xav kom nyeem peb Cov lus qhia pib ntawm System Design los txhawb koj qhov kev paub tseem ceeb.
Thaum xam phaj rau txoj haujlwm uas xav tau kev paub txog kev tsim qauv, koj muaj sijhawm los tham txog koj keeb kwm yav dhau los thiab qhia koj lub peev xwm los tsim cov txheej txheem nyuaj.
Thaum tham nrog ib tus neeg ua haujlwm muaj peev xwm, txoj hauv kev uas koj qhia koj tus kws tshaj lij tuaj yeem pab koj kom pom tau tias koj yog tus neeg sib tw muaj peev xwm rau txoj haujlwm.
Koj tuaj yeem npaj rau koj qhov kev xam phaj ua haujlwm los ntawm kev kawm cov tswv yim tsim qauv thiab xav txog seb koj yuav teb li cas rau cov lus nug txog lawv. Peb mam li mus hla qee qhov kev tsim qauv kev xam phaj cov lus nug thiab cov lus teb hauv tsab ntawv no los pab koj npaj rau koj qhov kev xam phaj tom ntej.
1. Koj txhais li cas los ntawm kev tsim qauv?
Cov txheej txheem ntawm kev tsim cov yam ntxwv ntawm lub system nrog rau cov modules, architecture, Cheebtsam, thiab lawv cov interfaces, thiab cov ntaub ntawv raws li predetermined qauv yog hu ua system tsim.
Nws yog cov txheej txheem ntawm kev txhais, tsim, thiab tsim cov tshuab kom tau raws li lub tuam txhab lossis lub koom haum cov hom phiaj thiab cov hom phiaj. Kev tsim qauv yog ntau ntxiv txog kev txheeb xyuas qhov system, cov qauv kev tsim vaj tsev, APIs, cov qauv tsim, thiab ua ke tag nrho ua ke dua li nws yog hais txog coding.
2. Dab tsi yog qhov tseem ceeb tshaj plaws ntawm tus tsim qauv?
- Cov neeg siv sib cuam tshuam
- Sab nraud API hu
- Cov txheej txheem offline
3. Dab tsi yog CAP theorem?
Raws li CAP (Consistency-Availability-Partition Tolerance) theorem, ib qho kev faib tsis tuaj yeem ua kom C, A, thiab P tag nrho tib lub sijhawm. Nws tsuas tuaj yeem xa ob ntawm peb qhov kev lees paub feem ntau. Cia peb siv ib qho kev faib database los pab peb nkag siab qhov no.
- Consistency: Qhov no qhia tau hais tias cov ntaub ntawv yuav tsum nyob twj ywm zoo ib yam thaum cov ntaub ntawv sib pauv ua tiav. Piv txwv li, tag nrho cov lus nug yuav tsum rov qab tib cov lus teb tom qab hloov tshiab database.
- Muaj: Cov databases yuav tsum muaj thiab teb txhua lub sijhawm.
- Partition kam rau ua: Txawm hais tias kev sib txuas lus yuav muaj teeb meem, lub database system yuav tsum tau ua haujlwm ntxiv.
4. Koj nkag siab dab tsi los ntawm kev ntsuas qhov load?
Ntsuas qhov sib npaug yog cov txheej txheem ntawm kev cuam tshuam cov khoom xa tuaj ntawm cov txheej txheem ntawm cov servers backend. Cov no yog hu ua server pools. Cov vev xaib niaj hnub no tau tsim los daws ntau lab cov lus nug los ntawm cov neeg siv khoom thiab teb rau lawv sai thiab ntseeg tau. Ntau cov servers yuav xav tau los daws cov kev xav tau no.
Hauv qhov no, nws yog ib qho tseem ceeb kom faib cov kev thov kom muaj txiaj ntsig ntawm txhua tus neeg rau zaub mov kom tsis txhob overburdening lawv. Lub load balancer ua haujlwm raws li tus tub ceev xwm tsheb, cuam tshuam kev thov thiab xa lawv ntawm cov servers muaj kom tsis muaj ib tus neeg rau zaub mov overburdened, muaj peev xwm ua rau kev ua haujlwm tsis zoo.
5. Qhov txawv ntawm asynchronous programming thiab parallel programming yog dab tsi?
Thaum koj khiav txhua yam asynchronously, nws txhais tau tias koj tsis tas yuav tos kom tiav ua ntej koj tuaj yeem mus rau lwm yam. Parallelism yog hais txog kev ua tiav ib txhij ntawm ntau txoj haujlwm.
Thaum koj tuaj yeem rhuav tshem cov haujlwm ua haujlwm sib txawv, kev sib luag ua haujlwm tau zoo. Async thiab Callbacks yog ib qho txhais tau tias (cov cuab yeej lossis cov txheej txheem) los sawv cev sib koom ua ke, piv txwv li ib pawg ntawm cov koom haum uas tuaj yeem sib txuas lus thiab sib koom cov peev txheej.
6. Dab tsi yog qhov txawv ntawm kab rov tav thiab ntsug scaling?
Qhov sib ntxiv ntawm cov cuab yeej siv computer tshiab rau lub network uas nthuav tawm cov kev ua haujlwm thiab kev xav tau ntawm lub cim xeeb thoob plaws lub network dispersed ntawm cov khoom siv yog hu ua kab rov tav scaling. Yooj yim hais, cov neeg rau zaub mov tshiab tau ntxiv rau lub pas dej tam sim no, thiab cov tsheb thauj mus los tau zoo sib kis ntawm cov khoom siv no.
Vertical scaling yog hais txog qhov kev xav ntawm kev nthuav dav ib lub computer qhov peev txheej los ntawm kev ntxiv RAM, CPUs tau zoo, lossis tsiv mus rau lub tshuab tshiab uas muaj peev xwm ntau dua. Tus neeg rau zaub mov ua haujlwm tuaj yeem nce ntxiv yam tsis tas yuav muaj kev hloov pauv hauv kev ua haujlwm.
7. Koj txhais li cas los ntawm latency, throughput, thiab system muaj?
Kev ua tau zoo yog qhov tseem ceeb ntawm kev tsim qauv vim nws ua rau muaj kev ceev thiab kev ntseeg siab ntawm peb cov kev pabcuam. Peb qhov kev ntsuas tseem ceeb tshaj plaws yog raws li hauv qab no:
- Lub sijhawm nws yuav siv los xa ib qho lus hauv milliseconds yog hu ua latency.
- Tus nqi ntawm cov ntaub ntawv ntse xa mus los ntawm ib qho system hauv ib lub sijhawm tshwj xeeb yog hu ua throughput. Bits per second yog siv los ntsuas nws.
- Lub sij hawm lub system muaj los teb cov lus nug yog txhais los ntawm nws qhov muaj. System Uptime / (System Uptime + Downtime) yog tus qauv rau kev suav nws.
8. ACID yog dab tsi?
- Atomicity: Nws paub tseeb tias kev hloov pauv ntawm cov ntaub ntawv yog tag nrho lossis tsis muaj.
- Consistency: Cov ntaub ntawv muaj nuj nqis hauv cov ntaub ntawv yog sib xws.
- Kev rho tawm: Nws yog hais txog kev sib cais ntawm ob qho kev lag luam.
- Durability: Cov ntaub ntawv khaws cia txawm tias lub server tsis ua haujlwm.
9. Dab tsi yog sharding?
Sharding yog cov txheej txheem ntawm kev faib cov ntaub ntawv pov thawj loj loj rau hauv ntau cov ntaub ntawv. Nws kuj tseem hais txog kev sib faib cov ntaub ntawv kab rov tav vim tias cov ntaub ntawv yuav muab khaws cia rau ntau lub khoos phis tawj. Yog li ntawd, cov ntaub ntawv sib koom tuaj yeem daws cov lus nug ntau dua li ib lub khoos phis tawj loj.
10. CDN yog dab tsi?
Lub network xa cov ntsiab lus yog lub network thoob ntiaj teb ntawm cov khoos phis tawj uas sib koom tes los muab cov ntaub ntawv hauv Is Taws Nem sai. Nws tso cai rau xa sai ntawm cov ntsiab lus xws li nplooj ntawv HTML, cov ntaub ntawv JavaScript, cov ntawv sau, duab, thiab cov yeeb yaj kiab uas tsim nyog los thauj cov ntsiab lus hauv Internet.
11. Vim li cas thiaj siv CDN?
- Xav txog cov peev txheej zoo li qub tsim nyob ib puag ncig 80% ntawm lub vev xaib, txais yuav CDN txo qhov kev nyuaj siab ntawm lub hauv paus server loj heev.
- Raws li muaj tsawg dua kev mus ncig, cov ntaub ntawv yuav muab nrawm dua rau cov tswv lub vev xaib uas muaj cov qhua los ntawm ntau thaj chaw.
- Cov neeg siv ntawm CDNs kuj tau txais txiaj ntsig los ntawm lub peev xwm kom nrawm nce thiab nqis hauv kev teb rau kev nce tsheb.
12. Qhov sib txawv ntawm kev sib faib thiab kev faib tawm yog dab tsi?
Database Sharding - Database sharding yog ib txoj hauv kev ntawm kev faib cov ntaub ntawv ib zaug rau hauv ntau cov ntaub ntawv kom nws tuaj yeem khaws cia ntawm cov chaw ua haujlwm sib txawv. Cov ntaub ntawv loj dua tuaj yeem tawg mus rau hauv cov chunks me thiab khaws cia hauv ntau cov ntaub ntawv nodes, ua kom tag nrho cov peev txheej khaws cia ntawm lub cev.
Los ntawm kev nthuav tawm cov ntaub ntawv hla ntau lub tshuab, cov ntaub ntawv sib koom tuaj yeem daws cov lus nug ntau dua li ib qho system.
Database Partitioning yog cov txheej txheem ntawm kev faib cov khoom khaws cia hauv database (cov ntxhuav, indexes, thiab views) rau hauv nyias daim. Txhawm rau kom tswj tau, kev ua tau zoo, thiab muaj, cov khoom loj hauv cov ntaub ntawv tau muab faib.
Qee qhov xwm txheej, kev faib tawm tuaj yeem txhim kho kev nrawm thaum nkag mus rau cov ntaub ntawv muab faib. Kev faib tawm tuaj yeem txo qhov ntsuas qhov loj me thiab ua rau kom muaj txoj hauv kev los nrhiav qhov xav tau tshaj plaws indexes hauv kev nco los ntawm kev ua tus thawj kab hauv indexes.
13. Dab tsi yog caching?
Caching yog cov txheej txheem ntawm khaws cov ntawv theej hauv thaj chaw cia ib ntus hu ua cache, uas ua kom cov ntaub ntawv nkag mus sai thiab txo qhov chaw latency. Tsuas yog qee tus lej ntawm cov ntaub ntawv tuaj yeem khaws cia hauv cache.
Yog li ntawd, kev txiav txim siab cache hloov tshiab cov tswv yim uas haum tshaj plaws rau cov hom phiaj kev lag luam yog qhov tseem ceeb.
14. CDN edge servers yog dab tsi?
CDN servers uas cov ntaub ntawv cache tau los ntawm koj lub hauv paus server lossis pawg cia yog hu ua ntug servers. Lub ntsiab lus ntawm lub xub ntiag yog ib lo lus uas nquag siv los piav txog ntug servers (POP).
Cov ntug servers yog lub cev nyob ntawm POP. Ntawm qhov POP, cov ntaub ntawv yuav raug cached los ntawm ntau lub servers.
Kev muaj peev xwm muab ntu ntawm lub vev xaib los ntawm ntau qhov chaw txo qhov kev ncua deb ntawm tus qhua thiab lub vev xaib server, ua rau qis dua latency. CDN ntug servers ua tiav lub hom phiaj meej no.
15. Dab tsi yog qhov sib txawv Consistency qauv rau kev tsim qauv?
Txhua qhov kev thov nyeem yuav tsum tau muab cov ntaub ntawv sau tsis ntev los no, raws li CAP txoj kev xav. Thaum muaj ntau cov ntaub ntawv luam tau siv tau, synchronizing lawv kom cov neeg siv khoom tau txais cov ntaub ntawv tshiab tas li ua qhov nyuaj. Cov hauv qab no yog cov qauv ua tau zoo sib xws:
- Tsis muaj qhov sib xws: Tom qab sau cov ntaub ntawv, qhov kev thov nyeem tuaj yeem lossis tsis tuaj yeem tau txais cov ntaub ntawv tshiab. Qhov kev ruaj ntseg theem no yog qhov zoo tagnrho rau cov ntawv thov hauv lub sijhawm xws li VoIP, kev sib tham video, thiab kev ua si sib tw.
- Qhov xwm txheej zoo sib xws: Nyeem yuav thaum kawg saib cov ntaub ntawv tsis ntev los no hauv milliseconds tom qab cov ntaub ntawv sau. Cov ntaub ntawv yog duplicated asynchronously nyob rau hauv cov ntaub ntawv no. DNS thiab email systems yog cov piv txwv ntawm qhov no. Qhov no ua haujlwm zoo nyob rau hauv cov tshuab nrog siab muaj.
- Muaj zog sib xws: Tom qab sau cov ntaub ntawv, cov neeg nyeem yav tom ntej yuav saib cov ntaub ntawv tsis ntev los no. Cov ntaub ntawv yog theej synchronously nyob rau hauv cov ntaub ntawv no. Qhov no tuaj yeem pom nyob rau hauv RDBMS thiab cov ntaub ntawv kaw lus, uas tsim nyog rau kev hloov ntaub ntawv.
16. Koj txhais li cas los ntawm kev cia siab rau qhov zoo?
Optimistic locking yog ib txoj hauv kev uas koj nyeem cov ntaub ntawv, sau ib tus lej version (lwm txoj hauv kev suav nrog hnub tim, timestamps, lossis checksums / hashes), thiab tom qab ntawd muab ob npaug rau xyuas tias cov version tsis tau hloov ua ntej sau nws rov qab.
Thaum koj sau cov ntaub ntawv rov qab, koj siv lub version los lim qhov hloov tshiab kom ntseeg tau tias nws yog atomic. (piv txwv li, tsis tau hloov pauv thaum koj tshawb xyuas lub version thiab thaum koj sau cov ntaub ntawv rau lub disk) thiab hloov kho txhua lub sijhawm.
17. Koj txhais li cas los ntawm "kev xaiv tsa thawj coj"?
Nyob rau hauv ib qho kev faib tawm nrog ntau cov servers uas pab txhawb rau daim ntawv thov muaj, tuaj yeem muaj sijhawm thaum tsuas yog ib tus neeg rau zaub mov yog lub luag haujlwm rau kev hloov kho APIs thib peb, vim ntau lub servers yuav ua rau muaj teeb meem thaum siv APIs.
Cov neeg rau zaub mov no hu ua thawj server, thiab cov txheej txheem rau kev xaiv nws yog hu ua tus thawj coj xaiv tsa. Thaum tus thawj coj neeg rau zaub mov ua tsis tiav hauv qhov kev faib tawm, cov servers yuav tsum pom qhov ua tsis tiav thiab xaiv tus thawj coj tshiab. Siv cov txheej txheem kev pom zoo, txoj hauv kev no yog qhov zoo tshaj plaws rau kev muaj peev xwm thiab muaj zog sib xws.
18. Koj txoj hauv kev yog dab tsi rau kev tsim TinyURL-zoo li URL shortening kev pab cuam?
TinyURL hloov qhov URL ntev mus rau hauv ib qho, tshwj xeeb URL luv. Cov thev naus laus zis no tuaj yeem lees txais qhov URL luv thiab xa rov qab qhov URL tiav.
Cov yam ntxwv tseem ceeb yog dab tsi?
- Ua qhov URL uas luv dua qhov qub.
- Khaws qhov URL ntev dua thiab hloov nws nrog qhov luv dua.
- Tso cai rau redirection hauv luv URLs.
- Luv URLs nrog cov npe kev cai tau txais kev txhawb nqa.
- Ua ntau yam nug ib zaug.
Dab tsi yog cov teeb meem tshwm sim tshaj plaws?
- Yuav ua li cas koj khaws cov ntaub ntawv khaws cia?
- Yuav ua li cas yog hais tias tus neeg siv load tshaj qhov kev cia siab?
- Yuav ua li cas yog tias ob tug neeg siv tib qhov kev cai URL?
Xav txog cov lus qhia hauv qab no:
- Hashing yog qhov kev xav uas tuaj yeem siv los txuas cov qub thiab tshiab URLs.
- QIV API tuaj yeem siv los tswj kev sib txuas lus pem hauv ntej thiab sib npaug ntawm qhov hnyav.
- Multithreading yog qhov kev xav uas tso cai rau koj los lis ntau qhov kev thov ib zaug.
- Thawj URLs yog khaws cia hauv NoSQL databases.
19. Koj txoj hauv kev los tsim twitter yog dab tsi?
Yuav tsum tau muab:
- Xa tweets
- Ua raws li lwm tus neeg siv
- Tweet pub/newsfeed
- Qhov system yog scalable
- Loads sai
- Qhov system yog txhim khu kev qha
Koj tuaj yeem pib xav txog koj tus qauv Twitter API thaum koj tau tsim cov qauv. Nov yog qhov nws yuav tshwm sim:
Txhawm rau pib, peb yuav kos cov API cov ntsiab lus tseem ceeb. Nov yog qee qhov piv txwv:
- sendTweet(lus)
- followUser(userID)
- unfollowUser(userID)
- getFeed(nplooj)
Cov architecture uas yuav pab kom cov yam ntxwv no tuaj yeem raug kos tawm. Peb tuaj yeem pib nrog tus neeg siv uas xa daim ntawv thov server. Peb tuaj yeem nruab API servers ntxiv tom qab lub load balancer los pab txoj kev loj dua cov tsheb thauj mus los kom ua tiav qhov kev xav tau. Peb yuav tsum tau ntxiv cov ntaub ntawv khaws cia peb cov tweets tam sim no.
Nws yog ib qho tseem ceeb kom nco ntsoov tias API peb muab yuav tsum tau scalable. Txhawm rau ua kom qhov kev pabcuam no tuaj yeem ua tau, peb tuaj yeem muaj ib qho ntawm peb cov API servers nyeem los ntawm ib lub cache cais rau peb cov ntawv xov xwm. Thaum ua li ntawd, peb kuj yuav tsum siv tus neeg muab khoom noj kom peb cov zaub mov cache mus txog hnub.
20. Tsim cov txheej txheem newsfeed rau Facebook
Newsfeed ntawm Facebook tso cai rau cov neeg siv pom dab tsi tshwm sim hauv lawv cov phooj ywg lub voj voog, nplooj ntawv nyiam, thiab cov koom haum lawv tau ua raws.
Dab tsi yog qee yam ntawm cov yam ntxwv tseem ceeb?
- Tsim cov ntawv xov xwm raws li cov lus tshaj tawm los ntawm lwm qhov system uas tus neeg siv ua raws.
- Cov ntawv nyeem, duab, suab, thiab video tuaj yeem siv rau hauv Newsfeed tshaj tawm.
- Hauv lub sijhawm tiag tiag, ntxiv cov ntsiab lus tshiab rau tus neeg siv cov ntawv xov xwm.
Dab tsi yog qee qhov teeb meem feem ntau?
- Yuav ua li cas yog qhov tshiab tshaj tawm yuav siv sij hawm ntev los tshwm nyob rau hauv xov xwm pub?
- Lub algorithm puas tuaj yeem tswj hwm qhov nce siab hauv cov neeg siv khoom?
- Cov ncej dab tsi yuav tsum tau nthuav tawm ua ntej hauv xov xwm pub?
Xav txog cov lus qhia hauv qab no:
- Tshawb xyuas cov fanout mechanism rau faib cov posts rau cov thwjtim.
- Tshawb xyuas seb sharding tuaj yeem siv tau los ua haujlwm zoo rau cov neeg siv khoom siab.
- Tus neeg siv cov ntaub ntawv pub yuav tsum tsis txhob muab luam tawm hla ntau lub servers. Sharding tuaj yeem ua tiav raws li tus neeg siv IDs.
21. Dab tsi yog qhov system BASE khoom?
Cov yam ntxwv ntawm BASE yog ubiquitous hauv NoSQL databases uas tau tshwm sim tsis ntev los no. Lub BASE system tsis muab qhov sib xws, raws li CAP theorem. Qhov no yog ib tug ua-up acronym uas sib haum mus rau lub CAP theorem cov nram qab no cov cuab yeej ntawm ib tug system:
- Lo lus "muaj peev xwm" txhais tau tias lub kaw lus yuav muaj txhua lub sijhawm.
- Lub xeev mos txhais tau hais tias qhov system lub xeev tuaj yeem sib txawv raws sijhawm, txawm tias tsis muaj kev tawm tswv yim. Qhov no feem ntau yog vim tus qauv qhov tshwm sim sib xws.
- Muab hais tias lub kaw lus tsis tau txais kev tawm tswv yim nyob rau lub sijhawm ntawd, qhov kev sib txig sib luag txhais tau hais tias lub kaw lus yuav ua raws li lub sijhawm.
22. Dab tsi yog Load Balancing nrog IP Chaw Nyob Affinity Technique?
Lwm txoj kev tseem ceeb ntawm kev ntsuas qhov ntsuas yog IP chaw nyob affinity. Tus neeg siv IP chaw nyob txuas nrog lub server node hauv txoj kev no. Ib lub server node tswj txhua qhov kev thov los ntawm tus neeg siv khoom IP chaw nyob.
Txoj kev no yooj yim rau kev siv txij li qhov chaw nyob IP ib txwm siv tau hauv HTTP thov header thiab tsis tas yuav tsum tau teeb tsa ntxiv. Yog tias koj cov neeg siv khoom yuav muaj cov ncuav qab zib deactivated, daim ntawv ntawm kev sib npaug ntawm cov khoom no tuaj yeem ua tau zoo.
23. Dab tsi yog qhov Cache Hloov Hloov (lossis Txoj Cai Tawm Tsam Tawm) algorithms?
Cache algorithms (tseem hu ua cache hloov algorithms, cache hloov txoj cai, lossis cache txoj cai tshem tawm) yog cov lus qhia ua kom zoo, lossis algorithms, uas lub khoos phis tawj lossis cov khoom siv kho vajtse tuaj yeem siv los tswj cov cache ntawm cov ntaub ntawv khaws cia hauv computer.
Caching boosts ceev los ntawm kev khaws cia tsis ntev los no siv los yog feem ntau nkag tau cov ntaub ntawv nyob rau hauv lub cim xeeb cheeb tsam uas yog ceev dua los yog tsis tshua kim mus nkag tau tshaj li ib txwm nco cia. Thaum lub cache puv, lub algorithm yuav tsum txiav txim siab cov khoom twg los tshem tawm thiaj li yuav ua rau qhov chaw tshiab.
24. Koj txhais li cas los ntawm kev faib khoom?
Ib qho kev faib tawm yog ib qho xwm txheej uas ib qho xwm txheej ua rau kev hloov pauv ntawm ob lossis ntau qhov sib txawv ntawm cov ntaub ntawv uas tsis tuaj yeem cog lus atomically.
Nws dhau los ua qhov nyuaj hauv ntiaj teb ntawm microservices vim tias txhua qhov kev pabcuam yog ib chav haujlwm ntawm kev ua haujlwm, thiab feem ntau ntawm cov kev pabcuam yuav tsum sib koom ua haujlwm kom ua tiav kev lag luam.
25. Dab tsi yog kev tshaib plab?
Thaum ib txoj xov tsis tuaj yeem tau txais kev nkag mus rau cov peev txheej sib koom, nws tau hais tias tshaib plab. Qhov no tshwm sim thaum "greedy" threads lossis threads nrog ntau dua "priority" ua rau kev sib koom siv tsis tau rau lub sijhawm ntev.
Xav txog ib yam khoom uas muab cov txheej txheem synchronized uas nquag rov qab lig. Yog hais tias ib tug xov rov hais dua txoj kev no, lwm cov xov uas yuav tsum tau nquag synchronized nkag mus rau tib yam khoom yuav raug thaiv ntau zaus.
xaus
Kev sib tham txog kev tawm tswv yim yog txhua yam uas qhov kev sib tham tsim qauv tsim muaj. Peb tau hais txog cov lus nug sib tham txog System Design ntau tshaj plaws hauv cov ntawv tshaj tawm no.
Kev nkag siab zoo ntawm txoj kev uas koj tab tom ua thaum tsim ib qho system tshwj xeeb yog qhov tseem ceeb heev kom dhau qhov System Design xam phaj.
Sau ntawv cia Ncua