{"id":80031,"date":"2020-05-02T13:42:49","date_gmt":"2020-05-02T11:42:49","guid":{"rendered":"https:\/\/prohoster.info\/blog\/administrirovanie\/top-fakapov-czian"},"modified":"2020-05-02T13:42:49","modified_gmt":"2020-05-02T11:42:49","slug":"top-fakapov-czian","status":"publish","type":"post","link":"https:\/\/prohoster.info\/sq\/blog\/administrirovanie\/top-fakapov-czian","title":{"rendered":"Top gabimeve t\u00eb Cian","gt_translate_keys":[{"key":"rendered","format":"text"}]},"content":{"rendered":"<p><img decoding=\"async\" alt=\"Top gabimeve t\u00eb Cian\" src=\"\/wp-content\/uploads\/2020\/05\/61cf8d25f1f3e858a3b9541cb026cf3c.png\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<br \/>\nT\u00eb gjith\u00ebve p\u00ebrsh\u00ebndetje!\u00a0<\/p>\n<p>M\u00eb quajn\u00eb Nikita, un\u00eb jam lideri i ekipit t\u00eb inxhinier\u00ebve n\u00eb Cian. Nj\u00eb nga detyrat e mia n\u00eb kompani \u00ebsht\u00eb t\u00eb ulim numrin e incidenteve q\u00eb lidhen me infrastruktur\u00ebn n\u00eb prodhim, deri n\u00eb zero.<br \/>\nAjo q\u00eb do t\u00eb flasim m\u00eb tej na ka sjell\u00eb shum\u00eb mundime, dhe q\u00ebllimi i k\u00ebtij artikulli \u00ebsht\u00eb t\u00eb ndihmojm\u00eb t\u00eb tjer\u00ebt t\u00eb mos p\u00ebrs\u00ebrisin gabimet tona ose t\u00eb pakt\u00ebn t\u00eb minimizojn\u00eb ndikimin e tyre.\u00a0<br \/>\n<noindex><a rel=\"nofollow\" name=\"habracut\"><\/a><\/noindex><\/p>\n<h3>Preambula<\/h3>\n<p>\nShum\u00eb koh\u00eb m\u00eb par\u00eb, kur Cian p\u00ebrb\u00ebhej nga monolite dhe nuk kishte asnj\u00eb shenj\u00eb t\u00eb mikrosh\u00ebrbimeve, ne matnim disponueshm\u00ebrin\u00eb e burimit duke kontrolluar 3\u20135 faqe.\u00a0<\/p>\n<p>N\u00ebse p\u00ebrgjigjeshin - gjith\u00e7ka ishte n\u00eb rregull, n\u00ebse nuk p\u00ebrgjigjeshin p\u00ebr nj\u00eb koh\u00eb t\u00eb gjat\u00eb - alarmohej. Sa koh\u00eb duhet t\u00eb mos punojn\u00eb p\u00ebr t'u konsideruar incident - e vendosnin njer\u00ebzit n\u00eb takime. Ekipi i inxhinier\u00ebve gjithmon\u00eb merrte pjes\u00eb n\u00eb hetimin e incidentit. Kur hetimi p\u00ebrfundonte, shkruhej nj\u00eb postmortem - nj\u00eb raport i till\u00eb d\u00ebrguar n\u00eb email n\u00eb formatin: \u00e7far\u00eb ndodhi, sa zgjati, \u00e7far\u00eb b\u00ebm\u00eb n\u00eb moment, \u00e7far\u00eb do t\u00eb b\u00ebjm\u00eb n\u00eb t\u00eb ardhmen.\u00a0<\/p>\n<h3>Faqet kryesore t\u00eb sitit ose si e kuptojm\u00eb se kemi arritur fundin<\/h3>\n<p>\u00a0<br \/>\nP\u00ebr t\u00eb pasur nj\u00eb m\u00ebnyr\u00eb p\u00ebr t\u00eb kuptuar prioritetin e gabimeve, kemi identifikuar faqet m\u00eb kritike p\u00ebr funksionalitetin e biznesit. N\u00eb to, ne num\u00ebrojm\u00eb numrin e k\u00ebrkesave t\u00eb suksesshme\/dhe t\u00eb pasuksesshme dhe koh\u00ebve t\u00eb pritjes. K\u00ebshtu matim uptime.\u00a0<\/p>\n<p>Supozoni se kemi zbuluar se ka nj\u00eb seri seksionesh super t\u00eb r\u00ebnd\u00ebsishme n\u00eb sit q\u00eb p\u00ebrgjigjen p\u00ebr sh\u00ebrbimin kryesor - k\u00ebrkesa dhe d\u00ebrgimi i njoftimeve. N\u00ebse numri i k\u00ebrkesave q\u00eb p\u00ebrfunduan me gabim tejkalon 1%, - ky \u00ebsht\u00eb nj\u00eb incident kritik. N\u00ebse p\u00ebr nj\u00eb periudh\u00eb 15 minutash gjat\u00eb or\u00ebve t\u00eb pikut, p\u00ebrqindja e gabimeve tejkalon 0,1% - kjo gjithashtu konsiderohet nj\u00eb incident kritik. K\u00ebto kritere mbulojn\u00eb shumic\u00ebn e incidenteve, nd\u00ebrsa t\u00eb tjeratShkruhen jasht\u00eb kufijve t\u00eb k\u00ebtij artikulli.<\/p>\n<p><img decoding=\"async\" alt=\"Top gabimeve t\u00eb Cian\" src=\"\/wp-content\/uploads\/2020\/05\/f5d76b1784c9a52ae1dc4728f1509ccc.png\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<\/p>\n<h3>T\u00eb dh\u00ebnat m\u00eb t\u00eb mira t\u00eb incidenteve t\u00eb Cian<\/h3>\n<p>\nK\u00ebshtu, ne sigurisht q\u00eb kemi m\u00ebsuar t\u00eb identifikojm\u00eb faktin se nj\u00eb incident ka ndodhur.\u00a0<\/p>\n<p>Tani \u00e7do incident \u00ebsht\u00eb p\u00ebrshkruar n\u00eb m\u00ebnyr\u00eb t\u00eb detajuar dhe \u00ebsht\u00eb reflektuar n\u00eb epik\u00ebn Jira. P\u00ebr ta th\u00ebn\u00eb k\u00ebt\u00eb: p\u00ebr k\u00ebt\u00eb kemi krijuar nj\u00eb projekt t\u00eb ve\u00e7ant\u00eb, e quajt\u00ebm FAIL - n\u00eb t\u00eb mund t\u00eb krijohen vet\u00ebm epika.\u00a0<\/p>\n<p>N\u00ebse t\u00eb gjitha d\u00ebshtimet e viteve t\u00eb fundit do t\u00eb mblidheshin, do t\u00eb dominonin:\u00a0<\/p>\n<ul>\n<li>incidencet q\u00eb lidhen me mssql;<\/li>\n<li>incidencet q\u00eb shkaktohen nga faktor\u00eb t\u00eb jasht\u00ebm;<\/li>\n<li>gabimet e administrator\u00ebve.<\/li>\n<\/ul>\n<p>\nLe t\u00eb ndalemi m\u00eb s\u00eb shumti te gabimet e administrator\u00ebve, si dhe disa d\u00ebshtime interesante t\u00eb tjera.<\/p>\n<h4>Vendi i pest\u00eb - \"Rregullimi i DNS\"<\/h4>\n<p>\nIshte nj\u00eb mart\u00eb e palakmushme. Ne vendos\u00ebm t\u00eb rregullojm\u00eb DNS-klasterin.\u00a0<\/p>\n<p>Na lindi d\u00ebshira t\u00eb transferonim serverat e brendsh\u00ebm t\u00eb DNS nga bind n\u00eb powerdns, duke ndar\u00eb p\u00ebr k\u00ebt\u00eb servera t\u00eb ve\u00e7ant\u00eb, ku nuk kishte asgj\u00eb p\u00ebrve\u00e7 DNS.\u00a0<\/p>\n<p>Vendos\u00ebm p\u00ebr nj\u00eb server DNS n\u00eb \u00e7do lokacion t\u00eb DC-ve tona dhe arriti momenti i migrimit t\u00eb zonave nga bind n\u00eb powerdns dhe kalimi i infrastruktur\u00ebs n\u00eb serverat e rinj.\u00a0<\/p>\n<p>N\u00eb mesin e migrimit, nga t\u00eb gjitha <a class=\"wpil_keyword_link\" href=\"https:\/\/prohoster.info\/sq\/server\/\"   title=\"servera\" data-wpil-keyword-link=\"linked\"  data-wpil-monitor-id=\"1484\">servera<\/a>q\u00eb ishin treguar n\u00eb cache lokal bind n\u00eb t\u00eb gjitha serverat, mbeti vet\u00ebm nj\u00eb, q\u00eb ishte n\u00eb qendr\u00ebn e t\u00eb dh\u00ebnave n\u00eb Sh\u00ebn Petersburg. Ky DC fillimisht kishte shkruar si jo kritik p\u00ebr ne, por papritur u b\u00eb pik\u00eb e vetme d\u00ebshtimi.<br \/>\nN\u00eb pik\u00ebrisht at\u00eb periudh\u00eb migrimi ra lidhja midis Mosk\u00ebs dhe Sh\u00ebn Petersburgut. Ne faktikisht mbet\u00ebm pa DNS p\u00ebr pes\u00eb minuta dhe u ringrit\u00ebm kur <a class=\"wpil_keyword_link\" href=\"https:\/\/prohoster.info\/sq\/\"   title=\"hostin\" data-wpil-keyword-link=\"linked\"  data-wpil-monitor-id=\"1206\">hostin<\/a> u zgjidh\u00ebn problemet.\u00a0<\/p>\n<p><b>Konkluzione: <\/b><\/p>\n<p>N\u00ebse m\u00eb her\u00ebt ne e neglizhonim faktor\u00ebt e jasht\u00ebm gjat\u00eb p\u00ebrgatitjes p\u00ebr pun\u00eb, tani ata gjithashtu jan\u00eb p\u00ebrfshir\u00eb n\u00eb list\u00ebn e asaje p\u00ebr \u00e7ka p\u00ebrgatitemi. Dhe tani synojm\u00eb q\u00eb t\u00eb gjith\u00eb komponent\u00ebt t\u00eb jen\u00eb t\u00eb rezervuar n-2, dhe p\u00ebr koh\u00ebn e pun\u00ebve mund t\u00eb ulim k\u00ebt\u00eb nivel n\u00eb n-1.<\/p>\n<ul>\n<li>Gjat\u00eb hartimit t\u00eb planit t\u00eb veprimit, sh\u00ebnojn\u00eb pikat ku sh\u00ebrbimi mund t\u00eb d\u00ebshtoj\u00eb, dhe mendoni skenar\u00eb ku gjith\u00e7ka shkoi \"keq p\u00ebr m\u00eb keq\", m\u00eb par\u00eb.<\/li>\n<li>Shp\u00ebrndani serverat e DNS t\u00eb brendsh\u00ebm n\u00eb lokacione t\u00eb ndryshme\/gjithsej\/kolonat\/switch-at\/fushtat.<\/li>\n<li>N\u00eb \u00e7do server vendosni nj\u00eb server lokal t\u00eb caching DNS q\u00eb drejton k\u00ebrkesat n\u00eb serverat kryesor\u00eb t\u00eb DNS, dhe n\u00eb rast t\u00eb paaksesueshm\u00ebris\u00eb s\u00eb tij, do t\u00eb p\u00ebrgjigjet nga cache.\u00a0<\/li>\n<\/ul>\n<p><\/p>\n<h4>Vendi i kat\u00ebrt - \"Rregullimi i Nginx\"<\/h4>\n<p>\nNj\u00eb dit\u00eb t\u00eb bukur ekipi yn\u00eb vendosi se \"mjaft \u00ebsht\u00eb mjaft\", dhe filloi procesi i ristrukturimit t\u00eb konfigurations s\u00eb nginx. Q\u00ebllimi kryesor - t\u00eb sillte konfigurimet n\u00eb nj\u00eb struktur\u00eb intuitively t\u00eb kuptueshme. M\u00eb par\u00eb gjith\u00e7ka ishte \"historikisht e p\u00ebrcaktuar\" dhe nuk pati asnj\u00eb logjik\u00eb. Tani \u00e7do server_name u nxorr n\u00eb nj\u00eb skedar t\u00eb quajtur nj\u00eblloj dhe ndar\u00eb t\u00eb gjitha konfigurimet sipas dosjeve. p\u00ebr ta th\u00ebn\u00eb k\u00ebt\u00eb - konfigurimi ka n\u00eb vetvete 253949 rreshta ose 7836520 karaktere dhe z\u00eb pothuajse 7 megabajt. Niveli i sip\u00ebrm i struktur\u00ebs:\u00a0<\/p>\n<p>                        <b class=\"spoiler_title\">Struktura Nginx<\/b><\/p>\n<pre><code class=\"plaintext\">\u251c\u2500\u2500 access\n\u2502 \u00a0 \u251c\u2500\u2500 allow.list\n...\n\u2502 \u00a0 \u2514\u2500\u2500 whitelist.conf\n\u251c\u2500\u2500 geobase\n\u2502 \u00a0 \u251c\u2500\u2500 exclude.conf\n...\n\u2502 \u00a0 \u2514\u2500\u2500 geo_ip_to_region_id.conf\n\u251c\u2500\u2500 geodb\n\u2502 \u00a0 \u251c\u2500\u2500 GeoIP.dat\n\u2502 \u00a0 \u251c\u2500\u2500 GeoIP2-Country.mmdb\n\u2502 \u00a0 \u2514\u2500\u2500 GeoLiteCity.dat\n\u251c\u2500\u2500 inc\n\u2502 \u00a0 \u251c\u2500\u2500 error.inc\n...\n\u2502 \u00a0 \u2514\u2500\u2500 proxy.inc\n\u251c\u2500\u2500 lists.d\n\u2502 \u00a0 \u251c\u2500\u2500 bot.conf\n...\n\u2502 \u00a0 \u251c\u2500\u2500 dynamic\n\u2502 \u00a0 \u2514\u2500\u2500 geo.conf\n\u251c\u2500\u2500 lua\n\u2502 \u00a0 \u251c\u2500\u2500 cookie.lua\n\u2502 \u00a0 \u251c\u2500\u2500 log\n\u2502 \u00a0 \u2502 \u00a0 \u2514\u2500\u2500 log.lua\n\u2502 \u00a0 \u251c\u2500\u2500 logics\n\u2502 \u00a0 \u2502 \u00a0 \u251c\u2500\u2500 include.lua\n\u2502 \u00a0 \u2502 \u00a0 \u251c\u2500\u2500 ...\n\u2502 \u00a0 \u2502 \u00a0 \u2514\u2500\u2500 utils.lua\n\u2502 \u00a0 \u2514\u2500\u2500 prom\n\u2502 \u00a0 \u00a0 \u00a0 \u251c\u2500\u2500 stats.lua\n\u2502 \u00a0 \u00a0 \u00a0 \u2514\u2500\u2500 stats_prometheus.lua\n\u251c\u2500\u2500 map.d\n\u2502 \u00a0 \u251c\u2500\u2500 access.conf\n\u2502 \u00a0 \u251c\u2500\u2500 ..\u00a0\n\u2502 \u00a0 \u2514\u2500\u2500 zones.conf\n\u251c\u2500\u2500 nginx.conf\n\u251c\u2500\u2500 robots.txt\n\u251c\u2500\u2500 server.d\n\u2502 \u00a0 \u251c\u2500\u2500 cian.ru\n\u2502 \u00a0 \u2502 \u00a0 \u251c\u2500\u2500 cian.ru.conf\n\u2502 \u00a0 \u2502 \u00a0 \u251c\u2500\u2500 ...\n\u2502 \u00a0 \u2502 \u00a0 \u2514\u2500\u2500 my.cian.ru.conf\n\u251c\u2500\u2500 service.d\n\u2502 \u00a0 \u251c\u2500\u2500 ...\n\u2502 \u00a0 \u2514\u2500\u2500 status.conf\n\u2514\u2500\u2500 upstream.d\n\u00a0\u00a0\u00a0\u00a0\u251c\u2500\u2500 cian-mcs.conf\n\u00a0\u00a0\u00a0\u00a0\u251c\u2500\u2500 ...\n\u00a0\u00a0\u00a0\u00a0\u2514\u2500\u2500 wafserver.conf<\/code><\/pre>\n<p>Ka \u00ebsht\u00eb b\u00ebr\u00eb ndjesh\u00ebm m\u00eb mir\u00eb, por gjat\u00eb ridhenim dhe shp\u00ebrndarjes s\u00eb konfigurimeve, disa prej tyre kishin nj\u00eb zgjedhje t\u00eb gabuar dhe nuk u p\u00ebrfshin\u00eb n\u00eb direktiv\u00ebn include *.conf. Si pasoj\u00eb, disa host-e u b\u00ebn\u00eb t\u00eb pakapsh\u00ebm dhe kthenin 301 n\u00eb t\u00eb par\u00ebn. P\u00ebr shkak se kodi i p\u00ebrgjigjes nuk ishte 5xx\/4xx, nuk u v\u00ebrejt menj\u00ebher\u00eb, por vet\u00ebm n\u00eb m\u00ebngjes. Pas k\u00ebsaj, filluam t\u00eb shkruajm\u00eb teste p\u00ebr t\u00eb kontrolluar komponent\u00ebt infrastrukturore.<\/p>\n<p><b>Konkluzione:<\/b>\u00a0<\/p>\n<ul>\n<li>Strukturojini sakt\u00eb konfigurimet (jo vet\u00ebm nginx) dhe mendoni p\u00ebr struktur\u00ebn n\u00eb faz\u00ebn e hershme t\u00eb projektit. K\u00ebshtu do t'i b\u00ebni ato m\u00eb t\u00eb kuptueshme p\u00ebr ekipin, duke ulur k\u00ebshtu TTM.<\/li>\n<li>P\u00ebr disa komponent\u00eb infrastrukture, shkruani teste. P\u00ebr shembull: kontrolloni q\u00eb t\u00eb gjith\u00eb server_name ky\u00e7 t\u00eb kthejn\u00eb statusin e duhur, + trupin e p\u00ebrgjigjes. Mjafton t\u00eb keni disa skripta t\u00eb thjesht\u00eb n\u00eb dispozicion q\u00eb kontrollojn\u00eb funksionet kryesore t\u00eb komponentit, p\u00ebr t\u00eb mos u kapur papritur n\u00eb 3 t\u00eb m\u00ebngjesit, duke u pyetur se \u00e7far\u00eb tjet\u00ebr duhet t\u00eb kontrolloni.\u00a0<\/li>\n<\/ul>\n<p><\/p>\n<h4>Vendi i tret\u00eb - \"Papritur mbaroi vendi n\u00eb Cassandra\"<\/h4>\n<p>\nT\u00eb dh\u00ebnat rriteshin progresivisht dhe gjith\u00e7ka ishte mir\u00eb deri n\u00eb momentin kur n\u00eb klasterin Cassandra filluan t\u00eb d\u00ebshtojn\u00eb riparimet e kaq shum\u00eb case-space, sepse nuk mund t\u00eb p\u00ebrfundonin kompaktimin.\u00a0<\/p>\n<p>Nj\u00eb dit\u00eb t\u00eb err\u00ebt, klasteri pothuajse u shnd\u00ebrrua n\u00eb nj\u00eb kungull, pik\u00ebrisht:<\/p>\n<ul>\n<li>mbet\u00ebn rreth 20% n\u00eb total n\u00eb klaster;<\/li>\n<li>nuk mund t\u00eb shtoheshin node t\u00eb plota, sepse nuk p\u00ebrfundonte pastrimi pas shtimit t\u00eb nj\u00eb node p\u00ebr shkak t\u00eb munges\u00ebs s\u00eb vendit n\u00eb pjes\u00ebt;<\/li>\n<li>performanca po bie pak nga pak, sepse kompaktimi nuk funksionon;\u00a0<\/li>\n<li>klasteri punon n\u00eb modalitetin emergjent.<\/li>\n<\/ul>\n<p>\n<img decoding=\"async\" alt=\"Top gabimeve t\u00eb Cian\" src=\"\/wp-content\/uploads\/2020\/05\/1d036fbc500a49a285fa4b0014e2a70d.png\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<br \/>\nZgjedhja - shtuam 5 node pa pastrimin, pas s\u00eb cil\u00ebs filluam t\u00eb nxjerrim ngadal\u00eb nga klasteri dhe t'i ri-insertojm\u00eb si node t\u00eb zbraz\u00ebta, t\u00eb cil\u00ebve u kishte mbaruar vendi. Koha e shpenzuar ishte shum\u00eb m\u00eb e madhe nga sa do doja. Kishim rrezik p\u00ebr nj\u00eb qasje t\u00eb pjesshme ose totale t\u00eb klasterit.\u00a0<\/p>\n<p><b>Konkluzione:<\/b><\/p>\n<ul>\n<li>N\u00eb t\u00eb gjitha server\u00ebt Cassandra, nuk duhet t\u00eb jet\u00eb e z\u00ebn\u00eb m\u00eb shum\u00eb se 60% e hap\u00ebsir\u00ebs n\u00eb secil\u00ebn pjes\u00eb.\u00a0<\/li>\n<li>Ato nuk duhet t\u00eb jen\u00eb t\u00eb ngarkuara m\u00eb shum\u00eb se 50% sipas CPU.<\/li>\n<li>Nuk duhet t\u00eb injoroni planifikimin e kapacitetit dhe duhet ta mendoni at\u00eb p\u00ebr secilin komponent, sipas specifikave t\u00eb tij.<\/li>\n<li>Sa m\u00eb shum\u00eb node n\u00eb klaster - aq m\u00eb mir\u00eb. Server\u00ebt q\u00eb mbajn\u00eb sasi t\u00eb vogla t\u00eb t\u00eb dh\u00ebnave, ri-rikthehen m\u00eb shpejt, dhe nj\u00eb klaster i till\u00eb \u00ebsht\u00eb m\u00eb i leht\u00eb p\u00ebr t'u rikuperuar.\u00a0<\/li>\n<\/ul>\n<p><\/p>\n<h4>Vendi i dyt\u00eb - \"T\u00eb dh\u00ebnat i\u0161en nga magazina e \u00e7el\u00ebsave dhe vlerave t\u00eb consul\"<\/h4>\n<p>\nP\u00ebr zbulimin e sh\u00ebrbimeve ne, si shum\u00eb t\u00eb tjer\u00eb, p\u00ebrdorim consul. Por ne e p\u00ebrdorim \u00e7el\u00ebsin dhe vler\u00ebn e tij p\u00ebr vendosjen blue-green t\u00eb monolit. Aty ruhen informacionet mbi upstream-at aktiv\u00eb dhe jo aktiv\u00eb, t\u00eb cilat nd\u00ebrruan vendet gjat\u00eb deploy-it. P\u00ebr k\u00ebt\u00eb \u00ebsht\u00eb shkruar nj\u00eb sh\u00ebrbim vendosjeje, i cili nd\u00ebrvepron me KV. N\u00eb nj\u00eb moment, t\u00eb dh\u00ebnat nga KV u zhduk\u00ebn. I rikuperuam nga memoria, por me disa gabime. Si pasoj\u00eb, gjat\u00eb vendosjes, ngarka n\u00eb upstream-at u shp\u00ebrnda n\u00eb m\u00ebnyr\u00eb t\u00eb pandjeshme, dhe mor\u00ebm shum\u00eb gabime 502 p\u00ebr shkak t\u00eb mbingarkes\u00ebs s\u00eb backend-\u00ebve sipas CPU. N\u00eb fund kemi kaluar nga consul KV n\u00eb postgres, nga ku t'i heq\u00ebsh nuk \u00ebsht\u00eb aq e leht\u00eb.\u00a0\u00a0<\/p>\n<p><b>Konkluzione:<br \/>\n<\/b><\/p>\n<ul>\n<li>Sh\u00ebrbimet pa ndonj\u00eb lloj autorizimi nuk duhet t\u00eb p\u00ebrmbajn\u00eb t\u00eb dh\u00ebna kritik\u00eb p\u00ebr funksionimin e faqes. P\u00ebr shembull, n\u00ebse nuk keni autorizim n\u00eb ES - do ishte m\u00eb mir\u00eb t\u00eb ndalonit qasje n\u00eb nivelin e rrjetit nga \u00e7do vend ku nuk nevojitet, t\u00eb linit vet\u00ebm ato t\u00eb nevojshme, si dhe t\u00eb b\u00ebnit action.destructive_requires_name: true.<\/li>\n<li>P\u00ebrgatitni mekanizmin e ruajtjes dhe rikuperimit paraprakisht. P\u00ebr shembull, p\u00ebrgatitni paraprakisht nj\u00eb skript (p\u00ebr shembull, n\u00eb Python), i cili di t\u00eb b\u00ebj\u00eb back-up dhe rikuperimin.<\/li>\n<\/ul>\n<p><\/p>\n<h4>Vendi i par\u00eb - \"Kapiteni i paditur\"\u00a0<\/h4>\n<p>\nN\u00eb nj\u00eb moment, v\u00ebm\u00eb re nj\u00eb shp\u00ebrndarje t\u00eb paekuilibruar t\u00eb ngarkes\u00ebs n\u00eb nginx upstream kur kishte 10+ servera n\u00eb backend. P\u00ebr shkak se round-robin drejtonte k\u00ebrkesat nga upstreami i par\u00eb deri tek ai i fundit n\u00eb rend, dhe \u00e7do reload i nginx fillonte nga fillimi, k\u00ebrkesat gjithmon\u00eb i binin m\u00eb shum\u00eb upstream\u00ebve t\u00eb par\u00eb se sa atyre t\u00eb tjer\u00ebve. Si pasoj\u00eb \u2014 ata punonin m\u00eb ngadal\u00eb dhe i gjith\u00eb siti vuante. Kjo b\u00ebhej gjithnj\u00eb e m\u00eb evidente me rritjen e trafikut. Thjesht p\u00ebr t\u00eb p\u00ebrdit\u00ebsuar nginx p\u00ebr t\u00eb p\u00ebrfshir\u00eb random, kjo nuk funksionoi \u2014 duhej t\u00eb ri-shkruhej nj\u00eb p\u00ebrmbledhje e madhe e kodit lua, i cili nuk funksionoi n\u00eb versionin 1.15 (n\u00eb at\u00eb koh\u00eb). Duhej t\u00eb patch-ojm\u00eb nginx 1.14.2, duke e p\u00ebrfshir\u00eb mb\u00ebshtetje p\u00ebr random. Kjo zgjidhi problemin. Ky defekt \u00ebsht\u00eb fitues n\u00eb kategorin\u00eb 'kapiteni i paduksh\u00ebm'.<\/p>\n<p><b>Konkluzione:<\/b><\/p>\n<p>Ishte shum\u00eb interesante dhe t\u00ebrheq\u00ebse t\u00eb hulumtoja k\u00ebt\u00eb defekt).\u00a0<\/p>\n<ul>\n<li>Nd\u00ebrtoni monitorimin n\u00eb nj\u00eb m\u00ebnyr\u00eb q\u00eb t\u00eb ndihmoj\u00eb n\u00eb identifikimin e k\u00ebtij lloj fluktuacionesh shpejt. P\u00ebr shembull, mund t\u00eb p\u00ebrdorni ELK p\u00ebr t\u00eb v\u00ebshtruar rps p\u00ebr \u00e7do backend t\u00eb \u00e7do upstream, duke ndjekur koh\u00ebn e tyre t\u00eb p\u00ebrgjigjes nga k\u00ebndv\u00ebshtrimi i nginx. N\u00eb k\u00ebt\u00eb rast, kjo na ndihmoi t\u00eb zbulojm\u00eb problemin.\u00a0<\/li>\n<\/ul>\n<p>\nSi rezultat, shumica e d\u00ebshtimeve mund t\u00eb ishin evituar me nj\u00eb qasje m\u00eb t\u00eb kujdesshme ndaj asaj q\u00eb po b\u00ebn. Duhet gjithmon\u00eb t\u00eb mbani mend ligjin e Murphy-t:\u00a0<i>Anything that can go wrong will go wrong, <\/i>dhe t\u00eb nd\u00ebrtoni komponent\u00ebt duke u udh\u00ebhequr prej tij.\u00a0<br \/>\n<br \/>Burimi: <a content=\"nofollow\" rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/company\/cian\/blog\/499542\/\">habr.com<\/a> <\/p>","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"excerpt":{"rendered":"<p>\u0412\u0441\u0435\u043c \u0434\u043e\u0431\u0440\u0430!\u00a0 \u041c\u0435\u043d\u044f \u0437\u043e\u0432\u0443\u0442 \u041d\u0438\u043a\u0438\u0442\u0430, \u044f \u0442\u0438\u043c\u043b\u0438\u0434 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0438\u043d\u0436\u0435\u043d\u0435\u0440\u043e\u0432 \u0426\u0438\u0430\u043d. \u041e\u0434\u043d\u043e\u0439 \u0438\u0437 \u043c\u043e\u0438\u0445 \u043e\u0431\u044f\u0437\u0430\u043d\u043d\u043e\u0441\u0442\u0435\u0439 \u0432 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u043d\u0438\u0436\u0435\u043d\u0438\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0438\u043d\u0446\u0438\u0434\u0435\u043d\u0442\u043e\u0432, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 \u0441 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043e\u0439 \u043d\u0430 \u043f\u0440\u043e\u0434\u0435, \u0434\u043e \u043d\u0443\u043b\u044f. \u0422\u043e, \u043e \u0447\u0435\u043c \u043f\u043e\u0439\u0434\u0435\u0442 \u0440\u0435\u0447\u044c \u0434\u0430\u043b\u0435\u0435, \u043f\u0440\u0438\u043d\u0435\u0441\u043b\u043e \u043d\u0430\u043c \u043c\u043d\u043e\u0433\u043e \u0431\u043e\u043b\u0438, \u0438 \u0446\u0435\u043b\u044c \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u2014 \u043d\u0435 \u0434\u0430\u0442\u044c \u0434\u0440\u0443\u0433\u0438\u043c \u043b\u044e\u0434\u044f\u043c \u043f\u043e\u0432\u0442\u043e\u0440\u0438\u0442\u044c \u043d\u0430\u0448\u0438\u0445 \u043e\u0448\u0438\u0431\u043e\u043a \u0438\u043b\u0438 \u0445\u043e\u0442\u044f \u0431\u044b \u043c\u0438\u043d\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0445 \u0432\u043b\u0438\u044f\u043d\u0438\u0435.\u00a0 [&hellip;]<\/p>\n","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"author":1,"featured_media":80032,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[688],"tags":[],"class_list":["post-80031","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-administrirovanie"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.0.1 - aioseo.com -->\n\t<meta name=\"description\" content=\"\u0412\u0441\u0435\u043c \u0434\u043e\u0431\u0440\u0430! \u041c\u0435\u043d\u044f \u0437\u043e\u0432\u0443\u0442 \u041d\u0438\u043a\u0438\u0442\u0430, \u044f \u0442\u0438\u043c\u043b\u0438\u0434 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0438\u043d\u0436\u0435\u043d\u0435\u0440\u043e\u0432 \u0426\u0438\u0430\u043d.\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Yuri Gagarin\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/prohoster.info\/sq\/blog\/administrirovanie\/top-fakapov-czian\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.0.1\" \/>\n\t\t<meta property=\"og:locale\" content=\"sq_AL\" \/>\n\t\t<meta property=\"og:site_name\" content=\"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"\ud83e\udd47\u0422\u043e\u043f \u0444\u0430\u043a\u0430\u043f\u043e\u0432 \u0426\u0438\u0430\u043d | ProHoster\" \/>\n\t\t<meta property=\"og:description\" content=\"\u0412\u0441\u0435\u043c \u0434\u043e\u0431\u0440\u0430! \u041c\u0435\u043d\u044f \u0437\u043e\u0432\u0443\u0442 \u041d\u0438\u043a\u0438\u0442\u0430, \u044f \u0442\u0438\u043c\u043b\u0438\u0434 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0438\u043d\u0436\u0435\u043d\u0435\u0440\u043e\u0432 \u0426\u0438\u0430\u043d.\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/prohoster.info\/sq\/blog\/administrirovanie\/top-fakapov-czian\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:width\" content=\"350\" \/>\n\t\t<meta property=\"og:image:height\" content=\"350\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2020-05-02T11:42:49+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2020-05-02T11:42:49+00:00\" \/>\n\t\t<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"\ud83e\udd47Top gabimet e Cian | ProHoster","description":"T\u00eb gjith\u00eb t\u00eb mirat! Quhem Nikita, un\u00eb jam lider i ekipit t\u00eb inxhinier\u00ebve t\u00eb Cian.","canonical_url":"https:\/\/prohoster.info\/sq\/blog\/administrirovanie\/top-fakapov-czian","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":null,"og:locale":"sq_AL","og:site_name":"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b","og:type":"article","og:title":"\ud83e\udd47\u0422\u043e\u043f \u0444\u0430\u043a\u0430\u043f\u043e\u0432 \u0426\u0438\u0430\u043d | ProHoster","og:description":"\u0412\u0441\u0435\u043c \u0434\u043e\u0431\u0440\u0430! \u041c\u0435\u043d\u044f \u0437\u043e\u0432\u0443\u0442 \u041d\u0438\u043a\u0438\u0442\u0430, \u044f \u0442\u0438\u043c\u043b\u0438\u0434 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0438\u043d\u0436\u0435\u043d\u0435\u0440\u043e\u0432 \u0426\u0438\u0430\u043d.","og:url":"https:\/\/prohoster.info\/sq\/blog\/administrirovanie\/top-fakapov-czian","og:image":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:secure_url":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:width":350,"og:image:height":350,"article:published_time":"2020-05-02T11:42:49+00:00","article:modified_time":"2020-05-02T11:42:49+00:00","article:publisher":"https:\/\/www.facebook.com\/prohoster","article:author":"https:\/\/www.facebook.com\/prohoster"},"aioseo_meta_data":{"post_id":"80031","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"seo_analyzer_scan_date":null,"breadcrumb_settings":null,"limit_modified_date":false,"reviewed_by":null,"ai":null,"created":"2021-02-28 12:47:44","updated":"2026-02-09 16:50:24","focus_keyword":null,"additional_keywords":null,"truseo_locale":null},"gt_translate_keys":[{"key":"link","format":"url"}],"_links":{"self":[{"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/posts\/80031","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/comments?post=80031"}],"version-history":[{"count":2,"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/posts\/80031\/revisions"}],"predecessor-version":[{"id":158728,"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/posts\/80031\/revisions\/158728"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/media\/80032"}],"wp:attachment":[{"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/media?parent=80031"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/categories?post=80031"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/tags?post=80031"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}