{"id":95322,"date":"2020-09-28T07:42:39","date_gmt":"2020-09-28T05:42:39","guid":{"rendered":"https:\/\/prohoster.info\/blog\/administrirovanie\/kratkij-obzor-operatorov-postgresql-dlya-kubernetes-nash-vybor-i-opyt"},"modified":"2020-09-28T07:42:39","modified_gmt":"2020-09-28T05:42:39","slug":"kratkij-obzor-operatorov-postgresql-dlya-kubernetes-nash-vybor-i-opyt","status":"publish","type":"post","link":"https:\/\/prohoster.info\/sq\/blog\/administrirovanie\/kratkij-obzor-operatorov-postgresql-dlya-kubernetes-nash-vybor-i-opyt","title":{"rendered":"Nj\u00eb p\u00ebrmbledhje e shkurt\u00ebr e operator\u00ebve PostgreSQL p\u00ebr Kubernetes, p\u00ebrzgjedhja dhe p\u00ebrvoja jon\u00eb","gt_translate_keys":[{"key":"rendered","format":"text"}]},"content":{"rendered":"<p><img decoding=\"async\" alt=\"Nj\u00eb p\u00ebrmbledhje e shkurt\u00ebr e operator\u00ebve PostgreSQL p\u00ebr Kubernetes, p\u00ebrzgjedhja dhe p\u00ebrvoja jon\u00eb\" src=\"\/wp-content\/uploads\/2020\/09\/23b2db49941fa5bd5000358c8ffb991b.jpg\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<br \/>\nK\u00ebrkesat nga klient\u00ebt po b\u00ebhen gjithnj\u00eb e m\u00eb t\u00eb shpeshta: \"Duam di\u00e7ka si Amazon RDS, por m\u00eb t\u00eb lir\u00eb\"; \"Duam si RDS, por kudo, n\u00eb \u00e7do infrastruktur\u00eb\". P\u00ebr t\u00eb realizuar nj\u00eb zgjidhje t\u00eb till\u00eb t\u00eb menaxhuar n\u00eb Kubernetes, kemi shqyrtuar situat\u00ebn aktuale t\u00eb operator\u00ebve m\u00eb t\u00eb njohur p\u00ebr PostgreSQL (Stolon, operator\u00ebt nga Crunchy Data dhe Zalando) dhe kemi b\u00ebr\u00eb zgjedhjen ton\u00eb.<\/p>\n<p>Ky artikull \u00ebsht\u00eb p\u00ebrvoja jon\u00eb e fituar si nga k\u00ebndv\u00ebshtrimi teorik (p\u00ebrmbledhje e zgjidhjeve), ashtu edhe nga ana praktike (\u00e7far\u00eb u zgjodh dhe \u00e7far\u00eb rezultati u arrit). Por p\u00ebrpara se t\u00eb fillojm\u00eb, le t\u00eb p\u00ebrcaktojm\u00eb se cilat jan\u00eb k\u00ebrkesat p\u00ebr nj\u00eb z\u00ebvend\u00ebsim potencial t\u00eb RDS\u2026<noindex><a rel=\"nofollow\" name=\"habracut\"><\/a><\/noindex><\/p>\n<h2>\u00c7far\u00eb \u00ebsht\u00eb RDS?<\/h2>\n<p>\nKur njer\u00ebzit flasin p\u00ebr RDS, sipas p\u00ebrvoj\u00ebs ton\u00eb, ata n\u00ebnkuptojn\u00eb nj\u00eb sh\u00ebrbim t\u00eb menaxhuar (managed) DB q\u00eb:<\/p>\n<ol>\n<li>\u00ebsht\u00eb leht\u00ebsisht e konfigurueshme;<\/li>\n<li>ka mund\u00ebsin\u00eb p\u00ebr t\u00eb punuar me snapshot-et dhe p\u00ebr t'u rikthyer nga ato (preferohet - me mb\u00ebshtetje p\u00ebr <noindex><a rel=\"nofollow\" href=\"https:\/\/en.wikipedia.org\/wiki\/Point-in-time_recovery\">PITR<\/a><\/noindex>);<\/li>\n<li>lejon krijimin e topologjive master-slave;<\/li>\n<li>ka nj\u00eb list\u00eb t\u00eb pasur zgjerimesh;<\/li>\n<li>ofron audit dhe menaxhim t\u00eb p\u00ebrdoruesve\/qasjeve.<\/li>\n<\/ol>\n<p>\nN\u00ebse flasim n\u00eb p\u00ebrgjith\u00ebsi, qasjet p\u00ebr realizimin e detyr\u00ebs s\u00eb caktuar mund t\u00eb jen\u00eb mjaft t\u00eb ndryshme, por rruga me Ansible-in nuk na p\u00ebrshtatet. (N\u00eb nj\u00eb p\u00ebrfundim t\u00eb ngjash\u00ebm arrit\u00ebn edhe koleg\u00ebt nga 2GIS n\u00eb rezultat <noindex><a rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/post\/509926\/\">t\u00eb p\u00ebrpjekjes s\u00eb tyre<\/a><\/noindex> p\u00ebr t\u00eb krijuar nj\u00eb \u00abmjet p\u00ebr shp\u00ebrndarjen e shpejt\u00eb t\u00eb nj\u00eb klasteri q\u00eb nuk d\u00ebshtojn\u00eb, t\u00eb bazuar n\u00eb Postgres\u00bb.)<\/p>\n<p>Precisht operator\u00ebt \u2014 \u00ebsht\u00eb qasja e pranuar gjer\u00ebsisht p\u00ebr zgjidhjen e k\u00ebtij lloji situatash n\u00eb ecosistemin Kubernetes. M\u00eb shum\u00eb rreth tyre n\u00eb lidhje me bazat e t\u00eb dh\u00ebnave q\u00eb jan\u00eb zbatuar brenda Kubernetes, tashm\u00eb e kishte p\u00ebrmendur drejtori teknik i \u00abFlant\u00bb, <noindex><a rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/users\/distol\/\" class=\"user_link\">distol<\/a><\/noindex>, n\u00eb <noindex><a rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/company\/flant\/blog\/431500\/\">n\u00eb nj\u00eb nga prezantimet e tij<\/a><\/noindex>.<\/p>\n<p><i><strong>NB<\/strong><\/i><i>: P\u00ebr krijimin e shpejt\u00eb t\u00eb operator\u00ebve t\u00eb thjesht\u00eb, rekomandojm\u00eb t\u00eb kushtoni v\u00ebmendje utilitarit ton\u00eb Open Source <\/i><noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/flant\/shell-operator\"><i>shell-operator<\/i><\/a><\/noindex><i>. P\u00ebrdorimi i tij e leht\u00ebson at\u00eb pa njohuri p\u00ebr Go, n\u00eb m\u00ebnyra q\u00eb jan\u00eb m\u00eb t\u00eb njohura p\u00ebr sistem administrator\u00ebt: n\u00eb Bash, Python etj.<\/i><\/p>\n<p>P\u00ebr PostgreSQL ekzistojn\u00eb disa operator\u00eb t\u00eb njohur K8s:<\/p>\n<ul>\n<li>Stolon;<\/li>\n<li>Operatori PostgreSQL i Crunchy Data;<\/li>\n<li>Operatori Postgres i Zalando.<\/li>\n<\/ul>\n<p>\nLe t\u00eb shohim ata m\u00eb me kujdes.<\/p>\n<h2>Zgjedhja e operatorit<\/h2>\n<p>\nP\u00ebrve\u00e7 atyre mund\u00ebsive t\u00eb r\u00ebnd\u00ebsishme q\u00eb tashm\u00eb p\u00ebrmend\u00ebm m\u00eb lart, ne \u2014 si inxhinier\u00eb t\u00eb operacioneve n\u00eb infrastruktura Kubernetes \u2014 gjithashtu prisnim nga operator\u00ebt t\u00eb kishin:<\/p>\n<ul>\n<li> shp\u00ebrndarje nga Git dhe me <noindex><a rel=\"nofollow\" href=\"https:\/\/kubernetes.io\/docs\/concepts\/extend-kubernetes\/operator\/#deploying-operators\">Resurset e Personalizuara<\/a><\/noindex>;<\/li>\n<li> mb\u00ebshtetje p\u00ebr pod anti-affinity;<\/li>\n<li> vendosjen e node affinity ose node selector;<\/li>\n<li> vendosjen e tolerances;<\/li>\n<li> prania e mund\u00ebsive p\u00ebr optimizim;<\/li>\n<li> teknologji dhe madje ekipe t\u00eb kuptueshme.<\/li>\n<\/ul>\n<p>\nP\u00ebrve\u00e7 detajeve t\u00eb \u00e7do pika (pyetni n\u00eb komentet n\u00ebse mbeten pyetje p\u00ebr to pas leximit t\u00eb artikullit t\u00eb gjith\u00eb), do t\u00eb theksoj se k\u00ebto parametra jan\u00eb t\u00eb nevojsh\u00ebm p\u00ebr nj\u00eb p\u00ebrshkrim m\u00eb delikat t\u00eb specializimit t\u00eb nyjeve t\u00eb klasterit n\u00eb m\u00ebnyr\u00eb q\u00eb t\u00eb mund t\u00eb porositen p\u00ebr aplikacione specifike. K\u00ebshtu mund t\u00eb arrijm\u00eb nj\u00eb balanc\u00eb optimale n\u00eb \u00e7\u00ebshtjet e performanc\u00ebs dhe kostos.<\/p>\n<p>Tani \u2014 p\u00ebr vet\u00eb operator\u00ebt e PostgreSQL.<\/p>\n<h3>1. Stolon<\/h3>\n<p>\n<noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/sorintlab\/stolon\">Stolon<\/a><\/noindex> nga kompania italiane Sorint.lab n\u00eb <noindex><a rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/company\/flant\/blog\/431500\/\">t\u00eb p\u00ebrmendura m\u00eb par\u00eb<\/a><\/noindex> u shqyrtua si nj\u00eb etalon mes operator\u00ebve p\u00ebr SGBD. Ky \u00ebsht\u00eb nj\u00eb projekt mjaft i vjet\u00ebr: l\u00ebshimi i tij publik i par\u00eb ndodhi ende n\u00eb n\u00ebntor 2015(!), nd\u00ebrsa depoja n\u00eb GitHub mund t\u00eb t\u00ebrheq\u00eb pothuajse 3000 yje dhe 40+ kontribues.<\/p>\n<p>Dhe me t\u00eb v\u00ebrtet\u00eb, Stolon \u00ebsht\u00eb nj\u00eb shembull i shk\u00eblqyer i arkitektur\u00ebs s\u00eb menduar:<\/p>\n<p><img decoding=\"async\" alt=\"Nj\u00eb p\u00ebrmbledhje e shkurt\u00ebr e operator\u00ebve PostgreSQL p\u00ebr Kubernetes, p\u00ebrzgjedhja dhe p\u00ebrvoja jon\u00eb\" src=\"\/wp-content\/uploads\/2020\/09\/a34625c130bfd29c5645cf2417042de2.jpg\" style=\"display:block;margin: 0 auto;\" \/><br \/>\nMe pajisjen e k\u00ebtij operatori mund t\u00eb njiheni n\u00eb detaje n\u00eb raport ose <noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/sorintlab\/stolon\/blob\/master\/doc\/architecture.md\">n\u00eb dokumentacionin e projektit.<\/a><\/noindex>. N\u00eb p\u00ebrgjith\u00ebsi, mjafton t\u00eb thuhet se ai di t\u00eb b\u00ebj\u00eb gjith\u00e7ka t\u00eb p\u00ebrshkruar: failover, proxy p\u00ebr qasje t\u00eb transparent\u00eb t\u00eb klient\u00ebve, backup\u2026 P\u00ebr m\u00eb tep\u00ebr, proxy ofrojn\u00eb akses p\u00ebrmes nj\u00eb endpoint-i sh\u00ebrbimi \u2014 ndryshe nga dy zgjidhjet e tjera t\u00eb shqyrtuara m\u00eb pas (ata kan\u00eb dy sh\u00ebrbime p\u00ebr qasje n\u00eb baz\u00eb).<\/p>\n<p>Megjithat\u00eb, Stolon <noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/sorintlab\/stolon\/issues\/463#issuecomment-379666733\">nuk ka Resurse t\u00eb Personalizuara<\/a><\/noindex>, p\u00ebr shkak t\u00eb t\u00eb cilave nuk mund t\u00eb krijohet thjesht dhe shpejt \u2014 \u00absi byrek\u00ebt e nxeht\u00eb\u00bb \u2014 instanca t\u00eb DB n\u00eb Kubernetes. Menaxhimi b\u00ebhet p\u00ebrmes utilitarit <code>stolonctl<\/code>, dhe vendosja b\u00ebhet p\u00ebrmes Helm-chart, nd\u00ebrsa p\u00ebrdoruesit p\u00ebrcaktohen n\u00eb ConfigMap.<\/p>\n<p>Nga nj\u00ebra an\u00eb, duket se operatori nuk \u00ebsht\u00eb shum\u00eb operues (sepse ai nuk p\u00ebrdor CRD). Por nga ana tjet\u00ebr \u2014 kjo \u00ebsht\u00eb nj\u00eb sistem fleksib\u00ebl, i cili lejon t\u00eb konfigurosh burimet n\u00eb K8s ashtu si\u00e7 t\u00eb duket m\u00eb e p\u00eblqyeshme.<\/p>\n<p>P\u00ebrmbledh\u00ebs, p\u00ebr ne nuk duket optimal t\u00eb krijojm\u00eb nj\u00eb chart t\u00eb ve\u00e7ant\u00eb p\u00ebr \u00e7do DB. Prandaj ne filluam t\u00eb k\u00ebrkojm\u00eb alternativa.<\/p>\n<h3>2. Operator PostgreSQL i Crunchy Data<\/h3>\n<p>\n<noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/CrunchyData\/postgres-operator\">Operatori nga Crunchy Data<\/a><\/noindex>, nj\u00eb fillim logjik i nj\u00eb startup-i t\u00eb ri amerikan. Historia e tij publike fillon me lansimin e par\u00eb m\u00eb mars 2017; dhe q\u00eb at\u00ebher\u00eb, depoja n\u00eb GitHub ka marr\u00eb pak m\u00eb pak se 1300 yje dhe mbi 50 kontribuues. Lansimi m\u00eb i fundit nga shtatori \u00ebsht\u00eb testuar p\u00ebr pun\u00eb me Kubernetes 1.15\u20141.18, OpenShift 3.11+ dhe 4.4+, GKE dhe VMware Enterprise PKS 1.3+.<\/p>\n<p>Arkitektura e Crunchy Data PostgreSQL Operator gjithashtu i p\u00ebrmbush k\u00ebrkesat e shpallura:<\/p>\n<p><img decoding=\"async\" alt=\"Nj\u00eb p\u00ebrmbledhje e shkurt\u00ebr e operator\u00ebve PostgreSQL p\u00ebr Kubernetes, p\u00ebrzgjedhja dhe p\u00ebrvoja jon\u00eb\" src=\"\/wp-content\/uploads\/2020\/09\/343cd0494abae42fcf5b47c5bb4eb310.jpg\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<br \/>\nMenaxhimi b\u00ebhet n\u00ebp\u00ebrmjet utilitarit <code>pgo<\/code>, megjithat\u00eb, kjo gjithashtu gjeneron Resurset e Personalizuara p\u00ebr Kubernetes. Prandaj, na g\u00ebzoi si p\u00ebrdorues potencial\u00eb operatori:<\/p>\n<ul>\n<li> ka menaxhim p\u00ebrmes CRD;<\/li>\n<li> menaxhim t\u00eb leht\u00eb t\u00eb p\u00ebrdoruesve (po ashtu p\u00ebrmes CRD);<\/li>\n<li> integrimi me komponent\u00eb t\u00eb tjer\u00eb <noindex><a rel=\"nofollow\" href=\"https:\/\/access.crunchydata.com\/documentation\/crunchy-postgres-containers\/4.3.1\/\">Crunchy Data Container Suite<\/a><\/noindex> \u2014 nj\u00eb koleksion i specializuar i imazhesh t\u00eb kontejner\u00ebve p\u00ebr PostgreSQL dhe utilitar\u00ebve p\u00ebr pun\u00eb me t\u00eb (p\u00ebrfshir\u00eb pgBackRest, pgAudit, zgjerimet nga contrib etj.).<\/li>\n<\/ul>\n<p>\nMegjithat\u00eb, p\u00ebrpjekjet p\u00ebr t\u00eb filluar p\u00ebrdorimin e operatorit nga Crunchy Data zbuloi disa probleme:<\/p>\n<ul>\n<li>Nuk kishte mund\u00ebsi tolerances \u2014 \u00ebsht\u00eb parashikuar vet\u00ebm nodeSelector.<\/li>\n<li>Pod\u2019\u00ebt e krijuara ishin pjes\u00eb e Deployment-it, megjith\u00ebse ne po implementonim aplikacione stateful. Ndryshe nga StatefulSet, Deployment-et nuk din\u00eb t\u00eb krijojn\u00eb disqe.<\/li>\n<\/ul>\n<p>\nK\u00ebtu \u00ebsht\u00eb nj\u00eb mang\u00ebsi tjet\u00ebr q\u00eb \u00e7on n\u00eb momente interesante: n\u00eb ambientin e testimit arrit\u00ebm t\u00eb ekzekutonim 3 replika me nj\u00eb disku. <i>storage lokal<\/i>, p\u00ebr sa koh\u00eb q\u00eb operatori raportonte se 3 replika ishin n\u00eb funksion (edhe pse kjo nuk ishte e v\u00ebrtet\u00eb).<\/p>\n<p>Nj\u00eb ve\u00e7ori tjet\u00ebr e k\u00ebtij operatori \u00ebsht\u00eb integrimi i tij i gatsh\u00ebm me sisteme t\u00eb ndryshme mb\u00ebshtet\u00ebse. P\u00ebr shembull, \u00ebsht\u00eb shum\u00eb e leht\u00eb t\u00eb instalosh pgAdmin dhe pgBounce, dhe n\u00eb <noindex><a rel=\"nofollow\" href=\"https:\/\/access.crunchydata.com\/documentation\/postgres-operator\/4.4.0\/installation\/other\/ansible\/installing-metrics\/\">dokumentacion<\/a><\/noindex> po shqyrtohen Grafana dhe Prometheus t\u00eb parakonfigurueshme. N\u00eb l\u00ebshimin e fundit <noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/CrunchyData\/postgres-operator\/releases\/tag\/v4.5.0-beta.1\">4.5.0-beta1<\/a><\/noindex> vler\u00ebsohet integrimi i p\u00ebrmir\u00ebsuar me projektin <noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/CrunchyData\/pgmonitor\">pgMonitor<\/a><\/noindex>, duke lejuar q\u00eb operatori t\u00eb ofroj\u00eb vizualizim t\u00eb qart\u00eb t\u00eb metrikave p\u00ebr PgSQL \"nga kutia\".<\/p>\n<p>Megjithat\u00eb, zgjedhja e \u00e7uditshme e resurseve Kubernetes t\u00eb gjeneruar na \u00e7oi t\u00eb k\u00ebrkojm\u00eb nj\u00eb zgjidhje tjet\u00ebr.<\/p>\n<h3>3. Zalando Postgres Operator<\/h3>\n<p>\nProduktet e Zalando na jan\u00eb njohur prej koh\u00ebsh: kemi p\u00ebrvoj\u00eb n\u00eb p\u00ebrdorimin e Zalenium dhe natyrisht, kemi provuar <noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/zalando\/patroni\">Patroni<\/a><\/noindex> \u2014 zgjidhjen e tyre t\u00eb njohur HA p\u00ebr PostgreSQL. P\u00ebr qasjen e kompanis\u00eb n\u00eb krijimin e <noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/zalando\/postgres-operator\">Postgres Operator<\/a><\/noindex> fliste nj\u00eb nga autor\u00ebt e tij \u2014 Alexey Klyukin \u2014 n\u00eb transmetimin <noindex><a rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/company\/flant\/blog\/479438\/\">Postgres-e mart\u00eb \u21165<\/a><\/noindex>, dhe na p\u00eblqeu.<\/p>\n<p>Ky \u00ebsht\u00eb zgjidhja m\u00eb e re nga ato t\u00eb shqyrtuara n\u00eb artikull: lansimi i par\u00eb ndodhi n\u00eb gusht 2018. Megjithat\u00eb, edhe pse numri formal i l\u00ebshimeve \u00ebsht\u00eb i vog\u00ebl, projekti ka b\u00ebr\u00eb nj\u00eb rrug\u00eb t\u00eb madhe, duke e tejkaluar zgjidhjen nga Crunchy Data me mbi 1300 yje n\u00eb GitHub dhe numrin maksimal t\u00eb kontribuesve (70+).<\/p>\n<p>\u00abN\u00ebn kapak\u00bb k\u00ebt\u00eb operator p\u00ebrdor zgjidhje t\u00eb provuara me koh\u00ebn:<\/p>\n<ul>\n<li> Patroni dhe <noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/zalando\/spilo\">Spilo<\/a><\/noindex> p\u00ebr menaxhim,<\/li>\n<li> <noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/wal-e\/wal-e\">WAL-E<\/a><\/noindex> \u2014 p\u00ebr backup,<\/li>\n<li> <noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/pgbouncer\/pgbouncer\">PgBouncer<\/a><\/noindex> \u2014 si nj\u00eb pool lidhjesh.<\/li>\n<\/ul>\n<p>\nJa si \u00ebsht\u00eb paraqitur arkitektura e operatorit nga Zalando:<\/p>\n<p><img decoding=\"async\" alt=\"Nj\u00eb p\u00ebrmbledhje e shkurt\u00ebr e operator\u00ebve PostgreSQL p\u00ebr Kubernetes, p\u00ebrzgjedhja dhe p\u00ebrvoja jon\u00eb\" src=\"\/wp-content\/uploads\/2020\/09\/c66f10c1a818592ecaacd2db4ce5ace5.jpg\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<br \/>\n\u041e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 Custom Resources, \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u043e\u0437\u0434\u0430\u0435\u0442 StatefulSet \u0438\u0437 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0437\u0430\u0442\u0435\u043c \u043c\u043e\u0436\u043d\u043e \u043a\u0430\u0441\u0442\u043e\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044f \u0432 pod \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 sidecar&#8217;\u044b. \u0412\u0441\u0451 \u044d\u0442\u043e \u2014 \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u043b\u044e\u0441 \u0432 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0438 \u0441 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u043c \u043e\u0442 Crunchy Data.<\/p>\n<p>P\u00ebr shkak se zgjidhja nga Zalando u zgjodh nd\u00ebr 3 opsionet e shqyrtuara, p\u00ebrshkrimi i m\u00ebtejsh\u00ebm i aft\u00ebsive t\u00eb saj do t\u00eb paraqitet m\u00eb posht\u00eb, menj\u00ebher\u00eb s\u00eb bashku me praktik\u00ebn e aplikimit.<\/p>\n<h2>Praktika me Postgres Operator nga Zalando<\/h2>\n<p>\nInstalimi i operatorit ndodh shum\u00eb leht\u00eb: mjafton t\u00eb shkarkoni lansimin aktual nga GitHub dhe t\u00eb aplikoni skedar\u00ebt YAML nga direktorja <noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/zalando\/postgres-operator\/tree\/master\/manifests\">manifests<\/a><\/noindex>. Si preferoni, mund t\u00eb p\u00ebrdorni gjithashtu <noindex><a rel=\"nofollow\" href=\"https:\/\/operatorhub.io\/operator\/postgres-operator\">OperatorHub<\/a><\/noindex>.<\/p>\n<p>Pas instalimit, \u00ebsht\u00eb e r\u00ebnd\u00ebsishme t\u00eb mendoni p\u00ebr konfigurimin <noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/zalando\/postgres-operator\/blob\/master\/docs\/reference\/operator_parameters.md#aws-or-gcp-interaction\">e depozitave p\u00ebr logjet dhe backup-et<\/a><\/noindex>. Kjo b\u00ebhet p\u00ebrmes ConfigMap <code>postgres-operator<\/code> n\u00eb hap\u00ebsir\u00ebn e emrave ku keni instaluar operatorin. Kur depozitat jan\u00eb konfiguruar, mund t\u00eb vendosni klasterin e par\u00eb PostgreSQL.<\/p>\n<p>P\u00ebr shembull, nj\u00eb deploy standard tek ne duket si m\u00eb posht\u00eb:<\/p>\n<pre><code class=\"plaintext\">apiVersion: acid.zalan.do\/v1\nkind: postgresql\nmetadata:\n name: staging-db\nspec:\n numberOfInstances: 3\n patroni:\n   synchronous_mode: true\n postgresql:\n   version: &quot;12&quot;\n resources:\n   limits:\n     cpu: 100m\n     memory: 1Gi\n   requests:\n     cpu: 100m\n     memory: 1Gi\n sidecars:\n - env:\n   - name: DATA_SOURCE_URI\n     value: 127.0.0.1:5432\n   - name: DATA_SOURCE_PASS\n     valueFrom:\n       secretKeyRef:\n         key: password\n         name: postgres.staging-db.credentials\n   - name: DATA_SOURCE_USER\n     value: postgres\n   image: wrouesnel\/postgres_exporter\n   name: prometheus-exporter\n   resources:\n     limits:\n       cpu: 500m\n       memory: 100Mi\n     requests:\n       cpu: 100m\n       memory: 100Mi\n teamId: staging\n volume:\n   size: 2Gi\n<\/code><\/pre>\n<p>\nKy manifest depolon nj\u00eb klaster prej 3 kopjeve me sidecar si <noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/wrouesnel\/postgres_exporter\">postgres_exporter<\/a><\/noindex>, nga i cili marrim metrikat e aplikacionit. Si\u00e7 e shihni, gjith\u00e7ka \u00ebsht\u00eb shum\u00eb e thjesht\u00eb dhe n\u00ebse d\u00ebshironi mund t\u00eb krijoni n\u00eb m\u00ebnyr\u00eb t\u00eb pakufizuar klastera.<\/p>\n<p>Duhet t\u00eb kushtoni v\u00ebmendje edhe p\u00ebr <b>panelin web p\u00ebr administrim<\/b> \u2014 <noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/zalando\/postgres-operator\/blob\/master\/docs\/operator-ui.md\">postgres-operator-ui<\/a><\/noindex>. Ai sjell\u00eb me operatorin dhe lejon krijimin dhe fshirjen e grupeve, si dhe punimin me backup-et q\u00eb b\u00ebn operatori.<\/p>\n<p><img decoding=\"async\" alt=\"Nj\u00eb p\u00ebrmbledhje e shkurt\u00ebr e operator\u00ebve PostgreSQL p\u00ebr Kubernetes, p\u00ebrzgjedhja dhe p\u00ebrvoja jon\u00eb\" src=\"\/wp-content\/uploads\/2020\/09\/2e9ae033a9817d101c843ce061aafdb5.jpg\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<i>Lista e grupeve PostgreSQL<\/i><\/p>\n<p><img decoding=\"async\" alt=\"Nj\u00eb p\u00ebrmbledhje e shkurt\u00ebr e operator\u00ebve PostgreSQL p\u00ebr Kubernetes, p\u00ebrzgjedhja dhe p\u00ebrvoja jon\u00eb\" src=\"\/wp-content\/uploads\/2020\/09\/74a65f7f301da14a0cb7bea6d5ef84ec.jpg\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<i>Menaxhimi i backup-eve<\/i><\/p>\n<p>Nj\u00eb karakteristik\u00eb tjet\u00ebr interesante \u00ebsht\u00eb mb\u00ebshtetja <noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/zalando\/postgres-operator\/blob\/master\/docs\/user.md#teams-api-roles\">Teams API<\/a><\/noindex>. Ky mekaniz\u00ebm krijon automatikisht <b>rollet n\u00eb PostgreSQL<\/b>, bazuar n\u00eb list\u00ebn e emrave t\u00eb p\u00ebrdoruesve t\u00eb marr\u00eb. Pas k\u00ebsaj, API lejon kthimin e list\u00ebs s\u00eb p\u00ebrdoruesve, p\u00ebr t\u00eb cil\u00ebt krijohen automatikisht rolet.<\/p>\n<h3>Problemet dhe zgjidhjet e tyre<\/h3>\n<p>\nMegjithat\u00eb, p\u00ebrdorimi i operatorit shpejgoi disa disavantazhe t\u00eb r\u00ebnd\u00ebsishme:<\/p>\n<ol>\n<li> mungesa e mb\u00ebshtetjes p\u00ebr nodeSelector;<\/li>\n<li> pamund\u00ebsia p\u00ebr t\u00eb \u00e7aktivizuar backup-et;<\/li>\n<li> n\u00eb p\u00ebrdorimin e funksionit t\u00eb krijimit t\u00eb bazave nuk shfaqen privilegjet e zakonshme;<\/li>\n<li> her\u00eb pas here mungon dokumentacioni ose ai \u00ebsht\u00eb n\u00eb nj\u00eb gjendje t\u00eb jashtme.<\/li>\n<\/ol>\n<p>\nFatmir\u00ebsisht, shum\u00eb prej tyre mund t\u00eb zgjidhen. Le t\u00eb fillojm\u00eb nga fundi \u2014 problemet me <strong>dokumentacionin<\/strong>. <\/p>\n<p>Mund\u00ebsisht do t\u00eb p\u00ebrballeni me faktin se nuk \u00ebsht\u00eb gjithmon\u00eb e qart\u00eb se si t\u00eb shkruani backup-in dhe si t\u00eb lidhni bucket-in e backup-it me Operator UI. K\u00ebt\u00eb p\u00ebrmend dokumentacioni vet\u00ebm n\u00eb kalim, kurse p\u00ebrshkrimi i sakt\u00eb \u00ebsht\u00eb n\u00eb <noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/zalando\/postgres-operator\/pull\/481\">PR<\/a><\/noindex>:<\/p>\n<ol>\n<li>duhet t\u00eb krijoni nj\u00eb sekret;<\/li>\n<li>ta p\u00ebrcillni at\u00eb operatorit si paramet\u00ebr <code>emri_i_secretit_t\u00eb_pod_ambientit<\/code> n\u00eb CRD me cil\u00ebsimet e operatorit ose n\u00eb ConfigMap (varet se si vendosni t\u00eb instaloni operatorin).<\/li>\n<\/ol>\n<p>\nMegjithat\u00eb, si\u00e7 ka rezultuar, aktualisht kjo nuk \u00ebsht\u00eb e mundur. Pik\u00ebrisht p\u00ebr k\u00ebt\u00eb arsye, ne grumbulluam <noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/flant\/postgres-operator\">versionin ton\u00eb t\u00eb operatorit<\/a><\/noindex> me disa p\u00ebrmir\u00ebsime shtes\u00eb nga pal\u00eb t\u00eb treta. M\u00eb shum\u00eb p\u00ebr k\u00ebt\u00eb \u2014 shih m\u00eb posht\u00eb.<\/p>\n<p>N\u00ebse i kaloni operatorit parametrat p\u00ebr backup, konkretisht \u2014 <code>wal_s3_bucket<\/code> dhe \u00e7el\u00ebsat e qasjes n\u00eb AWS S3, at\u00ebher\u00eb ai <strong>do t\u00eb b\u00ebj\u00eb backup t\u00eb gjith\u00e7kaje<\/strong>: jo vet\u00ebm bazat n\u00eb production, por edhe n\u00eb staging. K\u00ebt\u00eb nuk e pranuam.<\/p>\n<p>N\u00eb p\u00ebrshkrimin e parametrave p\u00ebr Spilo, e cila \u00ebsht\u00eb mb\u00ebshtjellja baz\u00eb Docker p\u00ebr PgSQL kur p\u00ebrdorni operatorin, u zbulua: \u00ebsht\u00eb e mundur t\u00eb kaloni parametrin <code>WAL_S3_BUCKET<\/code> si bosh, k\u00ebshtu q\u00eb t\u00eb \u00e7aktivizoni backup-et. M\u00eb shum\u00eb se kaq, p\u00ebr k\u00ebnaq\u00ebsin\u00eb ton\u00eb u gjet nj\u00eb <noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/zalando\/postgres-operator\/pull\/908\">PR i gatsh\u00ebm<\/a><\/noindex>, t\u00eb cilin ne e pranuam menj\u00ebher\u00eb n\u00eb fork-un ton\u00eb. Tani mjafton t\u00eb shtoni <code>enableWALArchiving: false<\/code> n\u00eb burimin e klasterit PostgreSQL.<\/p>\n<p>Po, kishte mund\u00ebsi t\u00eb b\u00ebhej ndryshe, duke e nisur 2 operator\u00eb: nj\u00eb p\u00ebr staging (pa backup), dhe tjetri \u2014 p\u00ebr production. Por k\u00ebshtu arrit\u00ebm ta b\u00ebjm\u00eb me nj\u00eb.<\/p>\n<p>Ok, m\u00ebsuam t\u00eb kalojm\u00eb n\u00eb bazat e t\u00eb dh\u00ebnave qasjen p\u00ebr S3 dhe backup-et filluan t\u00eb shkojn\u00eb n\u00eb depo. Si ta b\u00ebjm\u00eb q\u00eb faqet e backup-eve t\u00eb funksionojn\u00eb n\u00eb Operator UI?<\/p>\n<p><img decoding=\"async\" alt=\"Nj\u00eb p\u00ebrmbledhje e shkurt\u00ebr e operator\u00ebve PostgreSQL p\u00ebr Kubernetes, p\u00ebrzgjedhja dhe p\u00ebrvoja jon\u00eb\" src=\"\/wp-content\/uploads\/2020\/09\/46169b53707b0bbb686798c655022f40.jpg\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<br \/>\nN\u00eb UI-n\u00eb e Operatorit do t\u00eb nevojiten t\u00eb shtohen 3 variabla:<\/p>\n<ul>\n<li> <code>SPILO_S3_BACKUP_BUCKET<\/code><\/li>\n<li> <code>AWS_ACCESS_KEY_ID<\/code><\/li>\n<li> <code>AWS_SECRET_ACCESS_KEY<\/code><\/li>\n<\/ul>\n<p>\nPas k\u00ebsaj, menaxhimi i backup-eve do t\u00eb jet\u00eb i disponuesh\u00ebm, duke e leht\u00ebsuar pun\u00ebn me staging, duke lejuar dor\u00ebzimin e kopjeve nga production pa skripte shtes\u00eb.<\/p>\n<p>Si nj\u00eb tjet\u00ebr p\u00ebrfitim, u p\u00ebrmend puna me API e Teams dhe mund\u00ebsit\u00eb e shk\u00ebputura p\u00ebr krijimin e bazave dhe roleve p\u00ebrmes operatorit. Megjithat\u00eb, rolet e krijuara <strong>nuk kishin t\u00eb drejta t\u00eb paracaktuara<\/strong>. Prandaj, nj\u00eb p\u00ebrdorues me t\u00eb drejta leximi nuk mund t\u00eb lexohej tabelat e reja.<\/p>\n<p>Pse k\u00ebshtu? Edhe pse n\u00eb kodin <noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/zalando\/postgres-operator\/blob\/master\/pkg\/cluster\/database.go#L42\">ka<\/a><\/noindex> e nevojshme <code>GRANT<\/code>, ato nuk aplikohet gjithmon\u00eb. Ka 2 metoda: <code>syncPreparedDatabases<\/code> dhe <code>syncDatabases<\/code>. N\u00eb <code>syncPreparedDatabases<\/code> \u2014 pavar\u00ebsisht se n\u00eb seksionin <code>preparedDatabases<\/code> <noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/zalando\/postgres-operator\/blob\/master\/manifests\/complete-postgres-manifest.yaml#L26\">ka<\/a><\/noindex> ka nj\u00eb kusht <code>defaultRoles<\/code> dhe <code>defaultUsers<\/code> p\u00ebr krijimin e roleve, \u2014 t\u00eb drejtat e paracaktuara nuk aplikohen. Ne jemi n\u00eb procesin e p\u00ebrgatitjes s\u00eb patch-it p\u00ebr t\u00eb siguruar q\u00eb k\u00ebto t\u00eb drejta t\u00eb aplikohen automatikisht.<\/p>\n<p>Dhe momenti i fundit n\u00eb p\u00ebrmir\u00ebsimet aktuale p\u00ebr ne \u2014 <noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/zalando\/postgres-operator\/pull\/975\">patch<\/a><\/noindex>, duke Node Affinity n\u00eb StatefulSet q\u00eb po krijohet. Klient\u00ebt tan\u00eb shpesh preferojn\u00eb t\u00eb kursejn\u00eb shpenzimet, duke p\u00ebrdorur spot-instanca, dhe nuk \u00ebsht\u00eb e k\u00ebshillueshme t\u00eb vendosen sh\u00ebrbime DB aty. Ky problem mund t\u00eb zgjidhet edhe p\u00ebrmes tolerancave, por pranimi i Node Affinity ofron siguri m\u00eb t\u00eb madhe.<\/p>\n<h3>\u00c7far\u00eb dol\u00ebn?<\/h3>\n<p>\nPas zgjidhjes s\u00eb problemeve t\u00eb p\u00ebrmendura, ne fork-\u00ebm Postgres Operator nga Zalando n\u00eb <noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/flant\/postgres-operator\">repository ton\u00eb<\/a><\/noindex>, ku mbledh me patches kaq t\u00eb dobishme. P\u00ebr m\u00eb shum\u00eb leht\u00ebsi, ne gjithashtu <noindex><a rel=\"nofollow\" href=\"https:\/\/hub.docker.com\/r\/flant\/postgres-operator\">Docker-image<\/a><\/noindex>.<\/p>\n<p>Lista e PR-ve, t\u00eb pranuara n\u00eb fork:<\/p>\n<ul>\n<li><noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/zalando\/postgres-operator\/pull\/1066\">nd\u00ebrtimi i nj\u00eb Docker image t\u00eb sigurt dhe t\u00eb leht\u00eb p\u00ebr operatorin<\/a><\/noindex>;<\/li>\n<li><noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/zalando\/postgres-operator\/pull\/908\">\u00e7aktivizimin e backup-\u00ebve<\/a><\/noindex>;<\/li>\n<li><noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/zalando\/postgres-operator\/pull\/1121\">p\u00ebrdit\u00ebsimin e versioneve t\u00eb burimeve p\u00ebr versionet aktuale t\u00eb k8s<\/a><\/noindex>;<\/li>\n<li><noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/zalando\/postgres-operator\/pull\/975\">implementimi i Node Affinity<\/a><\/noindex>.<\/li>\n<\/ul>\n<p>\nDo t\u00eb ishte e shk\u00eblqyer, n\u00ebse komuniteti mb\u00ebshtet k\u00ebto PR, q\u00eb ato t\u00eb kalojn\u00eb n\u00eb upstream me versionin e ardhsh\u00ebm t\u00eb operatorit (1.6).<\/p>\n<h2>Bonus! Historia e suksesit me migrimin e production-it<\/h2>\n<p>\nN\u00ebse p\u00ebrdorni Patroni, mund t\u00eb migroni nj\u00eb production aktiv n\u00eb operator me minimumin e nd\u00ebrprerjeve.<\/p>\n<p>Spilo lejon krijimin e klaster\u00ebve standby p\u00ebrmes magazinave S3 me <noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/wal-e\/wal-e\">Wal-E<\/a><\/noindex>, kur logu binar PgSQL ruhet m\u00eb par\u00eb n\u00eb S3 dhe m\u00eb pas shkarkohet nga riprodhuesi. Por \u00e7far\u00eb t\u00eb b\u00ebni n\u00ebse keni <i>nuk<\/i> p\u00ebrdorur Wal-E n\u00eb infrastruktur\u00ebn e vjet\u00ebr? Zgjidhja e k\u00ebtij problemi \u00ebsht\u00eb tashm\u00eb <noindex><a rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/company\/true_engineering\/blog\/437318\/\">u propozuar<\/a><\/noindex> n\u00eb Habra.<\/p>\n<p>Replikimi logjik i PostgreSQL vjen n\u00eb ndihm\u00eb. Megjithat\u00eb, nuk do t\u00eb merremi me detaje se si t\u00eb krijojm\u00eb publikime dhe abonime, sepse\u2026 plani yn\u00eb kishte d\u00ebshtuar.<\/p>\n<p>Problemi \u00ebsht\u00eb se n\u00eb DB kishte disa tabela me ngarkes\u00eb t\u00eb lart\u00eb t\u00eb cilat kishin milion\u00eb rreshta, t\u00eb cilat, p\u00ebr m\u00eb tep\u00ebr, vazhdimisht plot\u00ebsoheshin dhe fshiheshin. <noindex><a rel=\"nofollow\" href=\"https:\/\/postgrespro.ru\/docs\/postgrespro\/12\/sql-createsubscription\">Abonimi i thjesht\u00eb<\/a><\/noindex> me <code>copy_data<\/code>, kur nj\u00eb replik\u00eb e re kopjon t\u00eb gjitha p\u00ebrmbajtjet nga masteri, thjesht nuk arrinte t\u00eb zhvillohej pas masterit. Kopjimi i p\u00ebrmbajtjes punoi p\u00ebr nj\u00eb jav\u00eb, por nuk arriti kurr\u00eb t\u00eb arrinte masterin. Si rezultat, u zgjidh problemi me ndihm\u00ebn e <noindex><a rel=\"nofollow\" href=\"https:\/\/medium.com\/avitotech\/recovery-use-cases-for-logical-replication-in-postgresql-10-a1e6bab03072\">artikull<\/a><\/noindex> koleg\u00ebve nga Avito: mund t\u00eb transferoni t\u00eb dh\u00ebnat duke p\u00ebrdorur <code>pg_dump<\/code>. Do t\u00eb p\u00ebrshkruaj variantin ton\u00eb (pak t\u00eb rregulluar) t\u00eb k\u00ebtij algoritmi.<\/p>\n<p>Ideja \u00ebsht\u00eb se mund t\u00eb krijoni nj\u00eb abonim t\u00eb fikur, t\u00eb lidhur me nj\u00eb slot t\u00eb caktuar t\u00eb replikimit, dhe m\u00eb pas t\u00eb korrigjoni numrin e transaksionit. Kishim replika p\u00ebr pun\u00ebn e prodhimit. Kjo \u00ebsht\u00eb e r\u00ebnd\u00ebsishme, sepse replika do t\u00eb ndihmoj\u00eb n\u00eb krijimin e nj\u00eb dump t\u00eb q\u00ebndruesh\u00ebm dhe n\u00eb vazhdimin e marrjes s\u00eb ndryshimeve nga masteri.<\/p>\n<p>N\u00eb komandat e m\u00ebposhtme, q\u00eb p\u00ebrshkruajn\u00eb procesin e migrimit, do t\u00eb p\u00ebrdoren k\u00ebto sh\u00ebnime p\u00ebr hostet:<\/p>\n<ol>\n<li><i>master<\/i> \u2014 serveri burim;<\/li>\n<li><i>replica1<\/i> \u2014 replika logjike n\u00eb prodhim t\u00eb vjet\u00ebr;<\/li>\n<li><i>replica2<\/i> \u2014 replika e re logjike.<\/li>\n<\/ol>\n<p><\/p>\n<h3>Plani i migrimit<\/h3>\n<p>\n1. T\u00eb krijojm\u00eb nj\u00eb abonim n\u00eb t\u00eb gjitha tabelat n\u00eb skem\u00ebn e masterit <code>publike<\/code> baza <code>dbname<\/code>:<\/p>\n<pre><code class=\"bash\">psql -h master -d dbname -c &quot;CREATE PUBLICATION dbname FOR ALL TABLES;&quot;\n<\/code><\/pre>\n<p>\n2. T\u00eb krijojm\u00eb nj\u00eb slot replikimi n\u00eb master:<\/p>\n<pre><code class=\"bash\">psql -h master -c &quot;select pg_create_logical_replication_slot('repl', 'pgoutput');&quot;\n<\/code><\/pre>\n<p>\n3. T\u00eb ndalim replikimin n\u00eb replika e vjet\u00ebr:<\/p>\n<pre><code class=\"bash\">psql -h replica1 -c &quot;select pg_wal_replay_pause();&quot;\n<\/code><\/pre>\n<p>\n4. T\u00eb marrim numrin e transaksionit nga masteri:<\/p>\n<pre><code class=\"bash\">psql -h master -c &quot;select replay_lsn from pg_stat_replication where client_addr = 'replica1';&quot;\n<\/code><\/pre>\n<p>\n5. T\u00eb marrim dump nga replika e vjet\u00ebr. Do ta b\u00ebjm\u00eb k\u00ebt\u00eb n\u00eb disa rrjedha, gj\u00eb q\u00eb do t\u00eb ndihmoj\u00eb n\u00eb p\u00ebrshpejtimin e procesit:<\/p>\n<pre><code class=\"bash\">pg_dump -h replica1 --no-publications --no-subscriptions -O -C -F d -j 8 -f dump\/ dbname\n<\/code><\/pre>\n<p>\n6. T\u00eb ngarkojm\u00eb dump n\u00eb serverin e ri:<\/p>\n<pre><code class=\"bash\">pg_restore -h replica2 -F d -j 8 -d dbname dump\/\n<\/code><\/pre>\n<p>\n7. Pasi t\u00eb ngarkohet dump-i, mund t\u00eb fillojm\u00eb replikimin n\u00eb replika t\u00eb rrjedh\u00ebs:<\/p>\n<pre><code class=\"bash\">psql -h replica1 -c &quot;select pg_wal_replay_resume();&quot;\n<\/code><\/pre>\n<p>\n7. T\u00eb krijojm\u00eb nj\u00eb abonim n\u00eb replika e re logjike:<\/p>\n<pre><code class=\"bash\">psql -h replica2 -c &quot;create subscription oldprod connection 'host=replica1 port=5432 user=postgres password=secret dbname=dbname' publication dbname with (enabled = false, create_slot = false, copy_data = false, slot_name='repl');&quot;\n<\/code><\/pre>\n<p>\n8. T\u00eb marrim <code>oid<\/code> abonimet:<\/p>\n<pre><code class=\"bash\">psql -h replica2 -d dbname -c &quot;select oid, * from pg_subscription;&quot;\n<\/code><\/pre>\n<p>\n9. Le t\u00eb themi, u mor <code>oid=1000<\/code>. T\u00eb aplikojm\u00eb numrin e transaksionit n\u00eb abonim:<\/p>\n<pre><code class=\"bash\">psql -h replica2 -d dbname -c &quot;select pg_replication_origin_advance('pg_1000', 'AA\/AAAAAAAA');&quot;\n<\/code><\/pre>\n<p>\n10. T\u00eb nisim replikimin:<\/p>\n<pre><code class=\"bash\">psql -h replica2 -d dbname -c &quot;alter subscription oldprod enable;&quot;\n<\/code><\/pre>\n<p>\n11. T\u00eb kontrollojm\u00eb statusin e abonimit, replikimi duhet t\u00eb funksionoj\u00eb:<\/p>\n<pre><code class=\"bash\">psql -h replica2 -d dbname -c &quot;select * from pg_replication_origin_status;&quot;\npsql -h master -d dbname -c &quot;select slot_name, restart_lsn, confirmed_flush_lsn from pg_replication_slots;&quot;\n<\/code><\/pre>\n<p>\n12. Pasi replikimi t\u00eb nis\u00eb dhe bazat t\u00eb jen\u00eb sinkronizuar, mund t\u00eb b\u00ebhet kalimi.<\/p>\n<p>13. Pasi t\u00eb nd\u00ebrpritet replikimi, duhet t\u00eb korrigjohen sekuencat. Kjo \u00ebsht\u00eb p\u00ebrshkruar mir\u00eb <noindex><a rel=\"nofollow\" href=\"https:\/\/wiki.postgresql.org\/wiki\/Fixing_Sequences\">n\u00eb artikullin n\u00eb wiki.postgresql.org<\/a><\/noindex>.<\/p>\n<p>Fal\u00eb k\u00ebtij plani, kalimi u realizua me vonesa minimale.<\/p>\n<h2>P\u00ebrfundimi<\/h2>\n<p>\nOperator\u00ebt e Kubernetes lejojn\u00eb thjeshtimin e veprimeve t\u00eb ndryshme, duke i reduktuar ato n\u00eb krijimin e resurseve K8s. Megjithat\u00eb, pasi t\u00eb arrini nj\u00eb automatizim t\u00eb shk\u00eblqyer me ndihm\u00ebn e tyre, \u00ebsht\u00eb e r\u00ebnd\u00ebsishme t\u00eb mbani mend se ajo mund t\u00eb sjell\u00eb gjithashtu disa nuanca t\u00eb papritura, prandaj qasuni me kujdes p\u00ebr zgjedhjen e operator\u00ebve.<\/p>\n<p>Pas shqyrtimit t\u00eb tri operator\u00ebve m\u00eb t\u00eb njohur Kubernetes p\u00ebr PostgreSQL, ne zgjodh\u00ebm projektin nga Zalando. Pavar\u00ebsisht se u p\u00ebrball\u00ebm me disa sfida, rezultati na k\u00ebnaqoi v\u00ebrtet, k\u00ebshtu q\u00eb planifikojm\u00eb ta zgjerim k\u00ebt\u00eb p\u00ebrvoj\u00eb edhe n\u00eb disa instalime t\u00eb tjera PgSQL. N\u00ebse keni p\u00ebrvoj\u00eb me zgjidhje t\u00eb ngjashme, do t\u00eb ishim t\u00eb lumtur t\u00eb shihnim detaje n\u00eb komentet!<\/p>\n<h2>P.S.<\/h2>\n<p>\nLexoni gjithashtu n\u00eb blogun ton\u00eb:<\/p>\n<ul>\n<li> \u00ab<noindex><a rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/company\/flant\/blog\/431500\/\">Baza t\u00eb dh\u00ebnash dhe Kubernetes (p\u00ebrmbledhje dhe video e prezantimit)<\/a><\/noindex>\u00bb;<\/li>\n<li> \u00ab<noindex><a rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/company\/flant\/blog\/479438\/\">Postgres E Mart\u00eb Nr. 5: PostgreSQL dhe Kubernetes. CI\/CD. Automatizimi i testimit<\/a><\/noindex>\u00bb;<\/li>\n<li> \u00ab<noindex><a rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/company\/flant\/blog\/480722\/\">Nj\u00eb histori me operatorin Redis n\u00eb K8s dhe nj\u00eb p\u00ebrmbledhje t\u00eb vegloseve p\u00ebr analizimin e t\u00eb dh\u00ebnave t\u00eb k\u00ebsaj DB<\/a><\/noindex>\u00bb.<\/li>\n<\/ul>\n<p>Burimi: <a content=\"nofollow\" rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/company\/flant\/blog\/520616\/\">habr.com<\/a> <\/p>","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"excerpt":{"rendered":"<p>\u0412\u0441\u0451 \u0447\u0430\u0449\u0435 \u043e\u0442 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432 \u043f\u043e\u0441\u0442\u0443\u043f\u0430\u044e\u0442 \u0442\u0430\u043a\u0438\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b: \u00ab\u0425\u043e\u0442\u0438\u043c \u043a\u0430\u043a Amazon RDS, \u043d\u043e \u0434\u0435\u0448\u0435\u0432\u043b\u0435\u00bb; \u00ab\u0425\u043e\u0442\u0438\u043c \u043a\u0430\u043a RDS, \u043d\u043e \u0432\u0435\u0437\u0434\u0435, \u0432 \u043b\u044e\u0431\u043e\u0439 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435\u00bb. \u0427\u0442\u043e\u0431\u044b \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0435 managed-\u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043d\u0430 Kubernetes, \u043c\u044b \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u043b\u0438 \u043d\u0430 \u0442\u0435\u043a\u0443\u0449\u0435\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432 \u0434\u043b\u044f PostgreSQL (Stolon, \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u044b \u043e\u0442 Crunchy Data \u0438 Zalando) \u0438 \u0441\u0434\u0435\u043b\u0430\u043b\u0438 \u0441\u0432\u043e\u0439 \u0432\u044b\u0431\u043e\u0440. \u042d\u0442\u0430 \u0441\u0442\u0430\u0442\u044c\u044f \u2014 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0439 \u043d\u0430\u043c\u0438 \u043e\u043f\u044b\u0442 \u0438 [&hellip;]<\/p>\n","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"author":1,"featured_media":95323,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[688],"tags":[],"class_list":["post-95322","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-administrirovanie"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.10 - aioseo.com -->\n\t<meta name=\"description\" content=\"\u0412\u0441\u0451 \u0447\u0430\u0449\u0435 \u043e\u0442 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432 \u043f\u043e\u0441\u0442\u0443\u043f\u0430\u044e\u0442 \u0442\u0430\u043a\u0438\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b: \u00ab\u0425\u043e\u0442\u0438\u043c \u043a\u0430\u043a Amazon RDS, \u043d\u043e \u0434\u0435\u0448\u0435\u0432\u043b\u0435\u00bb; \u00ab\u0425\u043e\u0442\u0438\u043c \u043a\u0430\u043a RDS, \u043d\u043e \u0432\u0435\u0437\u0434\u0435, \u0432 \u043b\u044e\u0431\u043e\u0439 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435\u00bb. \u0427\u0442\u043e\u0431\u044b \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0435 managed-\u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043d\u0430 Kubernetes, \u043c\u044b \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u043b\u0438 \u043d\u0430 \u0442\u0435\u043a\u0443\u0449\u0435\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432 \u0434\u043b\u044f PostgreSQL (Stolon, \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u044b \u043e\u0442 Crunchy Data \u0438 Zalando) \u0438 \u0441\u0434\u0435\u043b\u0430\u043b\u0438 \u0441\u0432\u043e\u0439 \u0432\u044b\u0431\u043e\u0440. \u042d\u0442\u0430 \u0441\u0442\u0430\u0442\u044c\u044f \u2014 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0439 \u043d\u0430\u043c\u0438 \u043e\u043f\u044b\u0442 \u0438\" \/>\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\/kratkij-obzor-operatorov-postgresql-dlya-kubernetes-nash-vybor-i-opyt\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.10\" \/>\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\u041a\u0440\u0430\u0442\u043a\u0438\u0439 \u043e\u0431\u0437\u043e\u0440 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432 PostgreSQL \u0434\u043b\u044f Kubernetes, \u043d\u0430\u0448 \u0432\u044b\u0431\u043e\u0440 \u0438 \u043e\u043f\u044b\u0442 | ProHoster\" \/>\n\t\t<meta property=\"og:description\" content=\"\u0412\u0441\u0451 \u0447\u0430\u0449\u0435 \u043e\u0442 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432 \u043f\u043e\u0441\u0442\u0443\u043f\u0430\u044e\u0442 \u0442\u0430\u043a\u0438\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b: \u00ab\u0425\u043e\u0442\u0438\u043c \u043a\u0430\u043a Amazon RDS, \u043d\u043e \u0434\u0435\u0448\u0435\u0432\u043b\u0435\u00bb; \u00ab\u0425\u043e\u0442\u0438\u043c \u043a\u0430\u043a RDS, \u043d\u043e \u0432\u0435\u0437\u0434\u0435, \u0432 \u043b\u044e\u0431\u043e\u0439 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435\u00bb. \u0427\u0442\u043e\u0431\u044b \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0435 managed-\u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043d\u0430 Kubernetes, \u043c\u044b \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u043b\u0438 \u043d\u0430 \u0442\u0435\u043a\u0443\u0449\u0435\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432 \u0434\u043b\u044f PostgreSQL (Stolon, \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u044b \u043e\u0442 Crunchy Data \u0438 Zalando) \u0438 \u0441\u0434\u0435\u043b\u0430\u043b\u0438 \u0441\u0432\u043e\u0439 \u0432\u044b\u0431\u043e\u0440. \u042d\u0442\u0430 \u0441\u0442\u0430\u0442\u044c\u044f \u2014 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0439 \u043d\u0430\u043c\u0438 \u043e\u043f\u044b\u0442 \u0438\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/prohoster.info\/sq\/blog\/administrirovanie\/kratkij-obzor-operatorov-postgresql-dlya-kubernetes-nash-vybor-i-opyt\" \/>\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-09-28T05:42:39+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2020-09-28T05:42:39+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\udd47P\u00ebrmbledhje e shkurt\u00ebr e operator\u00ebve PostgreSQL p\u00ebr Kubernetes, zgjedhja jon\u00eb dhe p\u00ebrvoja | ProHoster","description":"E m\u00eb shum\u00eb klient\u00eb na d\u00ebrgojn\u00eb k\u00ebrkesa t\u00eb tilla: 'Duam si Amazon RDS, por m\u00eb lir\u00eb'; 'Duam si RDS, por kudo, n\u00eb \u00e7do infrastruktur\u00eb'. P\u00ebr t\u00eb realizuar nj\u00eb zgjidhje t\u00eb till\u00eb t\u00eb menaxhuar n\u00eb Kubernetes, ne shqyrtuam gjendjen aktuale t\u00eb operator\u00ebve m\u00eb t\u00eb njohur p\u00ebr PostgreSQL (Stolon, operator\u00ebt nga Crunchy Data dhe Zalando) dhe b\u00ebm\u00eb zgjedhjen ton\u00eb. Ky artikull \u00ebsht\u00eb p\u00ebrvoja jon\u00eb e fituar dhe","canonical_url":"https:\/\/prohoster.info\/sq\/blog\/administrirovanie\/kratkij-obzor-operatorov-postgresql-dlya-kubernetes-nash-vybor-i-opyt","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\u041a\u0440\u0430\u0442\u043a\u0438\u0439 \u043e\u0431\u0437\u043e\u0440 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432 PostgreSQL \u0434\u043b\u044f Kubernetes, \u043d\u0430\u0448 \u0432\u044b\u0431\u043e\u0440 \u0438 \u043e\u043f\u044b\u0442 | ProHoster","og:description":"\u0412\u0441\u0451 \u0447\u0430\u0449\u0435 \u043e\u0442 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432 \u043f\u043e\u0441\u0442\u0443\u043f\u0430\u044e\u0442 \u0442\u0430\u043a\u0438\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b: \u00ab\u0425\u043e\u0442\u0438\u043c \u043a\u0430\u043a Amazon RDS, \u043d\u043e \u0434\u0435\u0448\u0435\u0432\u043b\u0435\u00bb; \u00ab\u0425\u043e\u0442\u0438\u043c \u043a\u0430\u043a RDS, \u043d\u043e \u0432\u0435\u0437\u0434\u0435, \u0432 \u043b\u044e\u0431\u043e\u0439 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435\u00bb. \u0427\u0442\u043e\u0431\u044b \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0435 managed-\u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043d\u0430 Kubernetes, \u043c\u044b \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u043b\u0438 \u043d\u0430 \u0442\u0435\u043a\u0443\u0449\u0435\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432 \u0434\u043b\u044f PostgreSQL (Stolon, \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u044b \u043e\u0442 Crunchy Data \u0438 Zalando) \u0438 \u0441\u0434\u0435\u043b\u0430\u043b\u0438 \u0441\u0432\u043e\u0439 \u0432\u044b\u0431\u043e\u0440. \u042d\u0442\u0430 \u0441\u0442\u0430\u0442\u044c\u044f \u2014 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0439 \u043d\u0430\u043c\u0438 \u043e\u043f\u044b\u0442 \u0438","og:url":"https:\/\/prohoster.info\/sq\/blog\/administrirovanie\/kratkij-obzor-operatorov-postgresql-dlya-kubernetes-nash-vybor-i-opyt","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-09-28T05:42:39+00:00","article:modified_time":"2020-09-28T05:42:39+00:00","article:publisher":"https:\/\/www.facebook.com\/prohoster","article:author":"https:\/\/www.facebook.com\/prohoster"},"aioseo_meta_data":{"post_id":"95322","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 11:08:22","updated":"2022-09-30 21:12:08"},"gt_translate_keys":[{"key":"link","format":"url"}],"_links":{"self":[{"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/posts\/95322","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=95322"}],"version-history":[{"count":0,"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/posts\/95322\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/media\/95323"}],"wp:attachment":[{"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/media?parent=95322"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/categories?post=95322"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/tags?post=95322"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}