Qhov no yuav tsom mus rau kev ntsuas lub network, ib qho ntawm cov txheej txheem nyuaj tshaj plaws hauv AWS. Cov evolution los ntawm ib tug ca network mus rau ib tug Virtual Private huab thiab nws tsim, cov kev pab cuam sab hauv ntawm Blackfoot thiab HyperPlane, qhov teeb meem ntawm ib tug neeg zej zog nrov, thiab thaum kawg - lub teev ntawm lub network, qaum thiab lub cev cables. Txog tag nrho cov no hauv qab txiav.
Tsis lees paub: txhua yam hauv qab no yog Vasily tus kheej lub tswv yim thiab tej zaum yuav tsis sib haum nrog txoj haujlwm ntawm Amazon Web Services.
Network scaling
AWS cloud was launched in 2006. Nws lub network yog qhov qub heev - nrog cov qauv tiaj tus. Qhov ntau ntawm cov chaw nyob ntiag tug yog ib txwm muaj rau txhua tus neeg nyob hauv huab. Thaum pib lub tshuab virtual tshiab, koj tau txais qhov chaw nyob IP uas muaj los ntawm ntau qhov no.
Txoj hauv kev no yooj yim rau kev siv, tab sis hauv paus txwv kev siv huab. Tshwj xeeb, nws yog qhov nyuaj heev los tsim cov kev daws teeb meem sib xyaw uas sib xyaw ua ke ntiag tug hauv av thiab hauv AWS. Qhov teeb meem feem ntau yog sib tshooj IP chaw nyob.
Virtual Private Huab
Cov huab tau tig tawm mus rau hauv kev thov. Lub sij hawm tau los xav txog kev scalability thiab muaj peev xwm ntawm nws siv los ntawm kaum tawm lab tus neeg xauj tsev. Lub tiaj tus network tau dhau los ua qhov teeb meem loj. Yog li ntawd, peb tau xav txog yuav ua li cas cais cov neeg siv los ntawm ib leeg ntawm qib network kom lawv tuaj yeem xaiv tus IP ntau yam.
Dab tsi yog thawj yam uas los rau hauv siab thaum koj xav txog kev sib cais network? Muaj tseeb tiag VLANs ΠΈ VRF - Virtual Routing thiab Forwarding.
Hmoov tsis, nws tsis ua haujlwm. VLAN ID tsuas yog 12 ntsis, uas muab rau peb tsuas yog 4096 ntu cais. Txawm tias cov keyboards loj tshaj plaws tuaj yeem siv ntau tshaj 1-2 txhiab VRFs. Siv VRF thiab VLAN ua ke muab peb ob peb lab subnets xwb. Qhov no yeej tsis txaus rau kaum tawm lab tus neeg xauj tsev, txhua tus yuav tsum tuaj yeem siv ntau lub subnets.
Peb kuj tsuas yog tsis tuaj yeem them taus mus yuav tus naj npawb ntawm cov thawv loj, piv txwv li, los ntawm Cisco lossis Juniper. Muaj ob qho laj thawj: nws yog qhov vwm kim, thiab peb tsis xav kom muaj kev hlub tshua ntawm lawv txoj kev txhim kho thiab patching txoj cai.
Tsuas muaj ib qho lus xaus - ua koj tus kheej daws.
Xyoo 2009 peb tau tshaj tawm VPC - Virtual Private Huab. Lub npe daig thiab tam sim no ntau tus neeg muab kev pabcuam huab kuj siv nws.
VPC yog lub network virtual SDN (Software Defined Network). Peb txiav txim siab tsis tsim cov txheej txheem tshwj xeeb ntawm qib L2 thiab L3. Lub network khiav ntawm tus qauv Ethernet thiab IP. Rau kev sib kis hauv lub network, kev khiav tsheb hauv lub tshuab virtual yog encapsulated hauv peb tus kheej raws tu qauv wrapper. Nws qhia tus ID uas yog tus neeg xauj tsev VPC.
Suab yooj yim. Txawm li cas los xij, muaj ntau yam kev sib tw loj uas yuav tsum tau kov yeej. Piv txwv li, qhov twg thiab yuav ua li cas khaws cov ntaub ntawv ntawm daim ntawv qhia virtual MAC / IP chaw nyob, VPC ID thiab sib thooj MAC / IP. Ntawm AWS scale, qhov no yog lub rooj loj loj uas yuav tsum ua haujlwm nrog kev nkag mus qeeb tsawg. Lub luag haujlwm rau qhov no daim ntawv qhia kev pabcuam, uas yog kis nyob rau hauv ib tug nyias txheej thoob plaws hauv lub network.
Hauv cov tshuab tiam tshiab, encapsulation yog ua los ntawm Nitro phaib ntawm qib kho vajtse. Hauv cov laus dua, encapsulation thiab decapsulation yog software-based.
Cia peb xav seb nws ua haujlwm li cas hauv cov ntsiab lus dav dav. Cia peb pib nrog qib L2. Cia peb xav tias peb muaj lub tshuab virtual nrog IP 10.0.0.2 ntawm lub cev server 192.168.0.3. Nws xa cov ntaub ntawv mus rau lub tshuab virtual 10.0.0.3, uas nyob ntawm 192.168.1.4. Qhov kev thov ARP yog tsim thiab xa mus rau lub network Nitro card. Rau qhov yooj yim, peb xav tias ob lub tshuab virtual nyob hauv tib "xiav" VPC.
Daim ntawv qhia hloov chaw nyob nrog nws tus kheej thiab xa ARP ncej mus rau qhov kev pab cuam.
Qhov kev pab cuam daim phiaj xa rov qab cov ntaub ntawv uas tsim nyog rau kev sib kis ntawm L2 lub cev network.
Daim npav Nitro hauv ARP teb hloov MAC ntawm lub cev network nrog qhov chaw nyob hauv VPC.
Thaum hloov cov ntaub ntawv, peb qhwv cov laj thawj MAC thiab IP hauv VPC wrapper. Peb xa tag nrho cov no hla lub cev network siv qhov tsim nyog thiab qhov chaw IP Nitro phaib.
Lub tshuab lub cev uas lub pob yog destined ua daim tshev. Qhov no yog qhov tsim nyog los tiv thaiv qhov muaj peev xwm ntawm qhov chaw nyob spoofing. Lub tshuab xa ib daim ntawv thov tshwj xeeb rau qhov kev pab cuam daim ntawv qhia thiab nug: βLos ntawm lub tshuab lub cev 192.168.0.3 Kuv tau txais ib pob ntawv uas npaj rau 10.0.0.3 hauv xiav VPC. Nws puas raug cai?
Qhov kev pab cuam daim ntawv qhia xyuas nws cov ntaub ntawv faib cov peev txheej thiab tso cai lossis tsis lees paub cov pob ntawv hla. Hauv txhua qhov xwm txheej tshiab, kev siv tau ntxiv yog kos rau hauv Nitro phaib. Nws yog tsis yooj yim sua kom bypass nws txawm theoretically. Yog li ntawd, spoofing rau cov peev txheej hauv lwm VPC yuav tsis ua haujlwm.
Tom ntej no, cov ntaub ntawv raug xa mus rau lub tshuab virtual uas nws xav tau.
Cov kev pab cuam daim ntawv qhia kuj ua haujlwm raws li lub laj thawj rau kev xa cov ntaub ntawv ntawm cov tshuab virtual hauv cov subnets sib txawv. Txhua yam yog conceptually yooj yim, kuv yuav tsis mus rau hauv kom meej.
Nws hloov tawm tias thaum xa txhua pob ntawv, cov servers tig mus rau qhov kev pabcuam kev pabcuam. Yuav ua li cas tiv nrog kev ncua ncua? Caching, tau kawg.
Qhov zoo nkauj yog tias koj tsis tas yuav cache tag nrho lub rooj loj. Lub cev neeg rau zaub mov hosts virtual tshuab los ntawm tus lej tsawg ntawm VPCs. Koj tsuas yog yuav tsum tau khaws cov ntaub ntawv hais txog VPCs no. Hloov cov ntaub ntawv mus rau lwm tus VPCs hauv "default" configuration tseem tsis raug cai. Yog tias kev ua haujlwm xws li VPC-peering yog siv, ces cov ntaub ntawv hais txog VPCs sib raug zoo ntxiv rau hauv lub cache.
Yuav ua li cas yog tias cov tsheb yuav tsum tau xa tawm sab nraud, piv txwv li hauv Is Taws Nem lossis ntawm VPN rau hauv av? Pab peb tawm ntawm no Blackfoot - AWS Internal Service. Nws yog tsim los ntawm peb pab neeg South African. Yog vim li cas qhov kev pabcuam no muaj npe tom qab penguin uas nyob hauv South Africa.
Blackfoot decapsulates tsheb thiab ua dab tsi xav tau nrog nws. Cov ntaub ntawv raug xa mus rau Is Taws Nem raws li yog.
Hauv AWS huab, kev xa xov latency yuav tsum muaj siab heev. Yog vim li cas HyperPlane tseem ceeb rau kev ua haujlwm ntawm tag nrho lub network.
Hyperplane yog tsim los ntawm EC2 lub tshuab virtual. Tsis muaj khawv koob nyob ntawm no, tsuas yog cunning. Qhov ua kom yuam kev yog tias cov no yog cov tshuab virtual nrog RAM loj. Kev khiav hauj lwm yog kev hloov pauv thiab ua tshwj xeeb hauv kev nco. Qhov no tso cai rau koj kom ua tiav qeeb ntawm tsuas yog kaum tawm microseconds. Ua haujlwm nrog lub disk yuav tua tag nrho cov khoom tsim tau.
Hyperplane yog ib qho kev faib tawm ntawm ntau lub tshuab EC2. Txhua lub tshuab virtual muaj bandwidth ntawm 5 GB / s. Thoob plaws tag nrho cov cheeb tsam hauv cheeb tsam, qhov no muab qhov zoo kawg terabits ntawm bandwidth thiab tso cai rau kev ua haujlwm. tsheej lab ntawm kev sib txuas hauv ib ob.
HyperPlane tsuas yog ua haujlwm nrog cov kwj deg xwb. VPC pob ntawv encapsulation yog pob tshab tag rau nws. Qhov muaj peev xwm ua rau muaj kev cuam tshuam hauv qhov kev pabcuam sab hauv no tseem yuav tiv thaiv VPC kev sib cais los ntawm kev tawg. Cov theem hauv qab no yog lub luag haujlwm rau kev ruaj ntseg.
Nrov nyob ze
Tseem muaj teeb meem nrov nyob ze - nrov nyob ze. Cia peb xav tias peb muaj 8 nodes. Cov nodes ua cov ntws ntawm txhua tus neeg siv huab. Txhua yam zoo li zoo thiab cov load yuav tsum tau muab sib npaug sib npaug ntawm txhua qhov nodes. Nodes muaj zog heev thiab nws nyuaj rau overload lawv.
Tab sis peb tsim peb architecture raws li txawm tias tsis zoo li scenarios.
Peb tuaj yeem xav txog qhov xwm txheej uas ib lossis ntau tus neeg siv yuav tsim cov khoom thauj ntau dhau. Tag nrho HyperPlane nodes koom nrog hauv kev ua cov khoom no thiab lwm tus neeg siv yuav muaj peev xwm ua tau qee yam kev ua tau zoo. Qhov no rhuav tshem lub tswvyim ntawm huab, uas cov neeg xauj tsev tsis muaj peev xwm cuam tshuam ib leeg.
Yuav ua li cas los daws qhov teeb meem ntawm ib tus neeg nyob ze tsis zoo? Thawj yam uas los rau hauv siab yog sharding. Peb 8 nodes yog logically muab faib ua 4 shards ntawm 2 nodes txhua. Tam sim no tus neeg nyob ze tsis zoo yuav cuam tshuam ib feem peb ntawm tag nrho cov neeg siv, tab sis nws yuav cuam tshuam rau lawv heev.
Cia peb ua tej yam txawv. Peb yuav faib tsuas 3 nodes rau txhua tus neeg siv.
Qhov ua kom yuam kev yog los muab cov nodes rau cov neeg siv sib txawv. Hauv daim duab hauv qab no, tus neeg siv xiav cuam tshuam cov nodes nrog ib qho ntawm ob tus neeg siv - ntsuab thiab txiv kab ntxwv.
Nrog 8 nodes thiab 3 cov neeg siv, qhov tshwm sim ntawm cov neeg nyob ze tsis sib xws nrog ib tus neeg siv yog 54%. Nws yog nrog qhov tshwm sim no uas tus neeg siv xiav yuav cuam tshuam rau lwm tus neeg xauj tsev. Nyob rau tib lub sijhawm, tsuas yog ib feem ntawm nws cov load. Hauv peb qhov piv txwv, qhov kev cuam tshuam no tsawg kawg yuav pom tsis tau rau txhua tus, tab sis tsuas yog ib feem peb ntawm tag nrho cov neeg siv. Qhov no yog ib qho txiaj ntsig zoo.
Tus naj npawb ntawm cov neeg siv uas yuav cuam tshuam
Qhov tshwm sim hauv feem pua
0
18%
1
54%
2
26%
3
2%
Cia peb coj qhov xwm txheej los ze rau qhov tseeb - cia peb noj 100 nodes thiab 5 cov neeg siv ntawm 5 nodes. Hauv qhov no, tsis muaj ib qho ntawm cov nodes yuav cuam tshuam nrog qhov tshwm sim ntawm 77%.
Tus naj npawb ntawm cov neeg siv uas yuav cuam tshuam
Qhov tshwm sim hauv feem pua
0
77%
1
21%
2
1,8%
3
0,06%
4
0,0006%
5
0,00000013%
Hauv qhov xwm txheej tiag tiag, nrog ntau tus lej ntawm HyperPlane nodes thiab cov neeg siv, qhov muaj peev xwm cuam tshuam ntawm cov neeg nyob sib ze tsis zoo rau lwm tus neeg siv yog tsawg. Txoj kev no hu ua sib tov sib xyaw - shuffle kev sib tw. Nws txo qis qhov tsis zoo ntawm node tsis ua haujlwm.
Tam sim no cia peb tham txog qhov ntsuas ntawm lub network nws tus kheej. Rau Lub Kaum Hli 2019 AWS muab nws cov kev pabcuam hauv 22 cheeb tsam, thiab 9 ntau ntxiv yog npaj.
Txhua cheeb tsam muaj ob peb Availability Zones. Muaj 69 ntawm lawv nyob ib ncig ntawm lub ntiaj teb no.
Txhua AZ muaj cov Chaw Ua Haujlwm Cov Ntaub Ntawv. Tsis muaj ntau tshaj 8 ntawm lawv nyob rau hauv tag nrho.
Lub chaw cov ntaub ntawv muaj ntau tus servers, qee qhov muaj txog 300.
Tam sim no cia peb nruab nrab txhua qhov no, sib npaug thiab tau txais ib daim duab zoo nkauj uas xav txog Amazon huab scale.
Tau kawg, peb tsis yog tib tus neeg muab kev pabcuam huab nrog ib lub pob txha ntiag tug. Ntau thiab ntau lub tuam txhab loj tau ua raws li txoj kev no. Qhov no tau lees paub los ntawm cov kws tshawb fawb ywj pheej, piv txwv li los ntawm Telegeography.
Daim duab qhia tau hais tias qhov sib koom ntawm cov neeg muab kev pabcuam thiab cov neeg muab kev pabcuam huab tau loj hlob. Vim li no, qhov sib koom ntawm Internet kev khiav tsheb ntawm cov neeg zov me nyuam qaum teb yog pheej yig dua.
Kuv mam piav qhia vim li cas qhov no tshwm sim. Yav dhau los, feem ntau cov kev pabcuam hauv web tau nkag tau thiab siv ncaj qha los ntawm Is Taws Nem. Niaj hnub no, ntau thiab ntau cov servers nyob hauv huab thiab nkag tau los ntawm CDN - Cov ntsiab lus faib Network. Txhawm rau nkag mus rau cov peev txheej, tus neeg siv nkag mus hauv Is Taws Nem tsuas yog mus rau CDN PoP ze tshaj plaws - Point of Presence. Feem ntau nws yog qhov chaw nyob ze. Tom qab ntawd nws tawm hauv pej xeem Is Taws Nem thiab yoov los ntawm lub pob txha ntiag tug thoob plaws Atlantic, piv txwv li, thiab tau ncaj qha mus rau cov peev txheej.
Kuv xav tias Internet yuav hloov pauv li cas hauv 10 xyoo yog tias qhov kev hloov no txuas ntxiv mus?
Lub cev channel
Cov kws tshawb fawb tseem tsis tau xam pom tias yuav ua li cas nce qhov ceev ntawm lub teeb nyob rau hauv lub ntiaj teb, tab sis lawv tau ua kom muaj kev nce qib los ntawm kev xa nws los ntawm kev xa nws los ntawm kev xa nws los ntawm kev xa nws los ntawm kev xa nws los ntawm kev xa nws los ntawm kev xa nws mus los ntawm kev hloov kho cov roj fiber ntau. Tam sim no peb siv 6912 fiber ntau cables. Qhov no yuav pab kom optimize tus nqi ntawm lawv cov installation.
Tsis muaj leej twg tiv thaiv los ntawm cov teeb meem thiab qee zaum peb cov channel raug puas tsuaj. Daim duab ntawm sab xis qhia pom cov kab hluav taws xob kho qhov muag hauv ib cheeb tsam Asmeskas uas raug torn los ntawm cov neeg ua haujlwm tsim kho. Raws li qhov tshwm sim ntawm qhov xwm txheej, tsuas yog 13 cov ntaub ntawv pob tau ploj, uas yog qhov xav tsis thoob. Ib zaug ntxiv - tsuas yog 13! Lub kaw lus cia tam sim hloov mus rau cov channel thaub qab - qhov ntsuas tau ua haujlwm.
Peb tau dhau los ntawm qee qhov Amazon cov kev pabcuam huab thiab thev naus laus zis. Kuv vam tias koj muaj tsawg kawg yog qee lub tswv yim ntawm cov nplai ntawm cov haujlwm uas peb cov engineers yuav tsum tau daws. Tus kheej, kuv pom qhov no zoo siab heev.
Nov yog qhov kawg ntawm trilogy los ntawm Vasily Pantyukhin txog AWS ntaus ntawv. IN thawj ntu piav qhia txog server optimization thiab database scaling, thiab hauv qhov thib ob - serverless functions thiab Firecracker.
rau HighLoad ++ Lub Kaum Ib Hlis Vasily Pantyukhin yuav qhia cov ntsiab lus tshiab ntawm Amazon ntaus ntawv. Nws yuav qhia hais txog qhov ua rau tsis ua haujlwm thiab tsim cov txheej txheem xa tawm ntawm Amazon. Lub Kaum Hli 24 tseem ua tau mus rau phau ntawv daim pib ntawm tus nqi zoo, thiab them tom qab. Peb tab tom tos koj ntawm HighLoad ++, tuaj tham!