Ho khetha polokelo ea data bakeng sa Prometheus: Thanos vs VictoriaMetrics

Lumelang bohle. Ka tlase ke sengoloa tlaleho ho tsoa ho Big Monitoring Meetup 4.

Prometheus - mokhoa oa ho shebella mekhoa le litšebeletso tse sa tšoaneng, ka thuso ea baokameli ba tsamaiso ba ka bokellang tlhahisoleseding e mabapi le mekhahlelo ea hona joale ea tsamaiso le ho theha litlhokomeliso ho fumana litsebiso mabapi le ho kheloha ha tsamaiso ea tsamaiso.

Tlaleho e tla kenyelletsa papiso Thanos и VictoriaMetrics - merero ea ho boloka nako e telele ea metrics ea Prometheus.

Ho khetha polokelo ea data bakeng sa Prometheus: Thanos vs VictoriaMetrics

Bapala video

Ho khetha polokelo ea data bakeng sa Prometheus: Thanos vs VictoriaMetrics

Pele, ke tla u bolella ka Prometheus. Ena ke mokhoa oa ho beha leihlo o bokellang metrics ho tsoa ho liphofu tse boletsoeng ebe o li boloka polokelong ea lehae. Prometheus e ka rekota metrics ho polokelo e hole mme e ka hlahisa litemoso le melao ea ho rekota.

Ho khetha polokelo ea data bakeng sa Prometheus: Thanos vs VictoriaMetrics

Meeli ea Prometheus:

  • Ha e na potso ea lefats'e ka bophara. Mona ke ha o na le mehlala e mengata e ikemetseng ea prometheus. Ba bokella metrics. 'Me u batla ho botsa ka holim'a metrics ena kaofela e bokelletsoeng ho tsoa maemong a fapaneng a prometheus. Prometheus ha e lumelle sena.
  • Ka prometheus, ts'ebetso e lekanyelitsoe ho seva se le seng feela. Prometheus ha e fetelle ka bo eona ho li-server tse ngata. U ka arola lipheo tsa hau ka letsoho lipakeng tsa Prometheus tse ngata.
  • Boholo ba metrics ho Prometheus bo lekanyelitsoe ho seva se le seng feela ka lebaka le tšoanang leo ka lona e ke keng ea ikemela ho li-server tse ngata.
  • Ha ho bonolo haholo ho hlophisa polokeho ea data ho Prometheus.

Ho khetha polokelo ea data bakeng sa Prometheus: Thanos vs VictoriaMetrics

Litharollo tsa mathata/liqholotso tsee?

Litharollo ke:

Litharollo tsena kaofela ke tsa polokelo e hole ea data e bokelletsoeng ke Prometheus. Ba rarolla bothata ba polokelo e hole ho tloha ho slide e fetileng ka mekhoa e fapaneng. Tlhahisong ena ke tla bua feela ka litharollo tse peli tsa pele: Thanos и VictoriaMetrics.

Ka lekhetlo la pele tlhahisoleseding e mabapi le Thanos e hlahile ka khokahano ena. Moaho o hlalosoa moo Thanos le kamoo e sebetsang kateng.

Ho khetha polokelo ea data bakeng sa Prometheus: Thanos vs VictoriaMetrics

Thanos e nka data eo Prometheus e e bolokileng ho disk ea lehae ebe e e kopitsa ho S3, ho GCS kapa ho boloka ntho enngwe.

Ho khetha polokelo ea data bakeng sa Prometheus: Thanos vs VictoriaMetrics

Kahoo Thanos e fana ka pono ea lipotso tsa lefats'e. O ka botsa data e bolokiloeng polokelong ea ntho ho tsoa maemong a mangata a Prometheus.

Ho khetha polokelo ea data bakeng sa Prometheus: Thanos vs VictoriaMetrics

Thanos e tšehetsa PromQL le Prometheus querying API.

Ho khetha polokelo ea data bakeng sa Prometheus: Thanos vs VictoriaMetrics

Thanos e sebelisa khoutu ea Prometheus ho boloka data.

Ho khetha polokelo ea data bakeng sa Prometheus: Thanos vs VictoriaMetrics

Thanos e hlahisoa ke baetsi ba tšoanang le ba Prometheus.

ka VictoriaMetrics. Mona link, moo re qalileng ho bua ka teng VictoriaMetrics.

Ho khetha polokelo ea data bakeng sa Prometheus: Thanos vs VictoriaMetrics

VictoriaMetrics e fumana data ho tsoa ho prometheus tse 'maloa remoutu ngola API protocol e tšehetsoeng ke Prometheus.

Ho khetha polokelo ea data bakeng sa Prometheus: Thanos vs VictoriaMetrics

VictoriaMetrics e fana ka pono ea lipotso tsa lefats'e, kaha maemo a mangata a Prometheus a ka ngolla data ho VictoriaMetrics e le 'ngoe. Ka hona, o ka etsa lipotso ho data ena kaofela.

Ho khetha polokelo ea data bakeng sa Prometheus: Thanos vs VictoriaMetrics

VictoriaMetrics e boetse e tšehetsa, joalo ka Thanos, PromQL le Prometheus querying API.

Ho khetha polokelo ea data bakeng sa Prometheus: Thanos vs VictoriaMetrics

Ho fapana le Thanos, khoutu ea mohloli oa VictoriaMetrics e ngotsoe ho tloha qalong 'me e lokiselitsoe lebelo le tšebeliso ea lisebelisoa.

Ho khetha polokelo ea data bakeng sa Prometheus: Thanos vs VictoriaMetrics

VictoriaMetrics, ho fapana le Thanos, sekala se otlolohile le se otlolohileng. Ja Mofuta oa node e le 'ngoe, e lekanyang ho ea holimo. O ka qala ka processor e le 'ngoe le 1 GB ea memori mme butle-butle o hola ho fihla ho makholo a li-processor le 1 TB ea mohopolo. VictoriaMetrics e ka sebelisa lisebelisoa tsena kaofela. Ts'ebetso ea eona e tla eketseha ka makhetlo a ka bang 100 ha e bapisoa le sistimi ea 1-core.

Ho khetha polokelo ea data bakeng sa Prometheus: Thanos vs VictoriaMetrics

Nalane ea Thanos e qalile ka Pulungoana 2017, ha boitlamo ba pele ba sechaba bo hlaha. Pele ho mona, Thanos e ile ea ntlafatsoa ka hare ntho e ka etsahalang.io.

Ho khetha polokelo ea data bakeng sa Prometheus: Thanos vs VictoriaMetrics

Ka Phuptjane 2019 ho bile le tokollo ea bohlokoa ea 0.5.0, eo ho eona tlositsoe lesebo protocol. O ile a tlosoa Thanos hobane a sa sebetse hantle. Hangata sehlopha sa Thanos se ne se sa sebetse ka nepo, li-node tse amanang le eona ka phoso ka lebaka la protocol ea lesebo. Kahoo, re ile ra etsa qeto ea ho mo tlosa moo. Ke nahana hore ena ke qeto e nepahetseng.

Ho khetha polokelo ea data bakeng sa Prometheus: Thanos vs VictoriaMetrics

Ka June 2019 eona eo, ba rometse nomoro ea kopo 256 в Cloud Native Computing Foundation.

Ho khetha polokelo ea data bakeng sa Prometheus: Thanos vs VictoriaMetrics

'Me kamora likhoeli tse' maloa Thanos o ile a amoheloa Cloud Native Computing Foundation, e kenyeletsang Prometheus, Kubernetes le merero e meng e tummeng.

Ho khetha polokelo ea data bakeng sa Prometheus: Thanos vs VictoriaMetrics

Ka Pherekhong 2018, nts'etsopele ea VictoriaMetrics e qalile.

Ho khetha polokelo ea data bakeng sa Prometheus: Thanos vs VictoriaMetrics

Ka Loetse 2018, ke ile ka bua phatlalatsa ka VictoriaMetrics lekhetlo la pele.

Ho khetha polokelo ea data bakeng sa Prometheus: Thanos vs VictoriaMetrics

Ka December 2018, ho ile ha hatisoa mofuta oa Node e le 'ngoe.

Ho khetha polokelo ea data bakeng sa Prometheus: Thanos vs VictoriaMetrics

Ka May 2019 li ile tsa hatisoa mehloli ea mefuta e 'meli ea Single-node le cluster.

Ho khetha polokelo ea data bakeng sa Prometheus: Thanos vs VictoriaMetrics

Ka Phuptjane 2019, joalo ka Thanos, re ile ra kenya kopo ho setsi sa CNCF ka nomoro 255. Re ile ra etsa kopo letsatsi le le leng pele Thanos a etsa kopo.

Ho khetha polokelo ea data bakeng sa Prometheus: Thanos vs VictoriaMetrics

Empa, ka bomalimabe, ha re e-so amoheloe moo. Thuso ea sechaba e hlokahala.

Ho khetha polokelo ea data bakeng sa Prometheus: Thanos vs VictoriaMetrics

Ha re shebeng li-slide tsa bohlokoahali tse bonts'ang meralo ea Thanos le VictoriaMetrics.

Ho khetha polokelo ea data bakeng sa Prometheus: Thanos vs VictoriaMetrics

Ha re qaleng ka Thanos. Likarolo tse mosehla ke likarolo tsa Prometheus. Lintho tse ling kaofela ke likarolo tsa Thanos. A re qaleng ka karolo ea bohlokoa ka ho fetisisa. Thanos Sidecar ke karolo e kentsoeng haufi le Prometheus e 'ngoe le e' ngoe. E jarisa data ea Prometheus ho tloha polokelong ea lehae ho ea ho S3 kapa ntho e 'ngoe ea polokelo.

Ho boetse ho na le karolo e bitsoang Thanos Store Gateway, e ka balang data ena ho Object Storage ka likopo tse tsoang ho Thanos Query. Thanos Query e sebelisa PromQL le Prometheus API. Ke hore, ho tsoa ka ntle ho shebahala joaloka Prometheus. E fumana lipotso tsa PromQL, e li romella ho Thanos Store Gateway, Thanos Store Gateway e lata lintlha tse hlokahalang ho Object Storage, ea e khutlisa.

Empa re boloka data ho Object Storage ntle le lihora tse peli tsa ho qetela ka lebaka la karolo ea ts'ebetsong ea Thanos Sidecar, e ke keng ea kenya lihora tse peli tse fetileng ho Object Storage S3, kaha Prometheus ha e e-s'o bōpe lifaele bakeng sa lihora tsena tse peli sebakeng sa polokelo ea lehae.

U entse qeto ea ho tsamaea joang tabeng ee? Thanos Query, ntle le likopo ho Thanos Store Gateway, e romella likopo tse tšoanang ho e 'ngoe le e 'ngoe ea Thanos Sidecar, e haufi le Prometheus.

'Me Thanos Sidecar, ka lehlakoreng le leng, proxies e kopa ho ea pele ho Prometheus, mme e fumana lintlha tsa lihora tse peli tse fetileng.

Ntle le likarolo tsena, ho boetse ho na le karolo ea boikhethelo ntle le eo Thanos e ke keng ea sebetsa hantle. Ena ke Thanos Compact, e ikarabellang bakeng sa ho kopanya lifaele tse nyane ho Object Storage ho lifaele tse kholo tse kentsoeng mona ke Thanos Sidecars. Thanos Sidecar e kenya lifaele tsa data moo ka lihora tse peli. Lifaele tsena, haeba li sa kopanngoa ho lifaele tse kholoanyane, joale palo ea tsona e ka hola haholo. Ha lifaele tse joalo li le ngata, ho hlokahala mohopolo o eketsehileng bakeng sa Thanos Store Gateway, ho hlokahala lisebelisoa tse ngata ho fetisetsa data ho marang-rang le metadata. Thanos Store Gateway ha e sebetse. Ka hona, hoa hlokahala ho tsamaisa Thanos Compact, e kopanyang lifaele tse nyane ho tse kholo, e le hore ho be le lifaele tse fokolang tse joalo le ho fokotsa holimo ho Thanos Store Gateway.

Ho boetse ho na le karolo e kang Thanos Ruler. E phethahatsa melao ea tlhokomeliso ea Prometheus mme e ka hlahloba melao ea ho rekota ea Prometheus e le hore e ngole lintlha ho khutlela ho Object Storage. Empa karolo ena ha e khothalletsoe ho sebelisoa, hobane ... Eena e atisa ho khutlisa data e sa fellang.

Ena ke morero o bonolo oa Thanos.

Ho khetha polokelo ea data bakeng sa Prometheus: Thanos vs VictoriaMetrics

Joale ha re e bapise le morero oa VictoriaMetrics.

VictoriaMetrics e na le mefuta e 2: mofuta o le mong oa node le sehlopha sa sehlopha. Node e le 'ngoe e sebetsa komporong e le' ngoe. Node e le 'ngoe ha e na likarolo tsena, ke binary e le' ngoe feela. Binary ena e selaeteng e shebahala joalo ka sekwere sena. Ntho e 'ngoe le e 'ngoe e ka hare ho lisekoere ke likahare tsa faele ea binary bakeng sa mofuta oa Single-node. Ha ho hlokahale hore u tsebe ka eena. U mpa u tsamaisa binary 'me tsohle lia re sebeletsa.

Mofuta oa sehlopha o rarahane ho feta. Ka hare ho eona ho na le likarolo tse tharo tse fapaneng: vmselect, vminsert le vmstorage. Ho tsoa lebitsong la bona ho lokela ho hlaka seo e mong le e mong oa bona a se etsang. Karolo ea Insert e amohela data ka mekhoa e fapaneng: ho tsoa ho Prometheus remote write API, Influx line protocol, Graphite protocol le ho tsoa ho protocol ea OpenTSDB. Karolo ea Insert ea li amohela, ea li arola le ho li aba pakeng tsa likarolo tse teng tsa polokelo, moo data e seng e bolokiloe. Karolo ea Khetha, le eona, e amohela lipotso tsa PromQL. O kenya lisebelisoa PromQL, hammoho le Prometheus querying API, 'me e ka sebelisoa e le sebaka sa Prometheus Grafana kapa bareki ba bang ba Prometheus API. Khetha e amohela kopo ea promql, ea e fetisa, e bala lintlha tse hlokahalang bakeng sa ho etsa kopo ena ho tsoa libakeng tsa polokelo, e sebetsana le data ena mme e khutlisetsa karabo.

Ho khetha polokelo ea data bakeng sa Prometheus: Thanos vs VictoriaMetrics

Ha re bapise ho rarahana ha ho kenya Thanos le VictoriaMetrics.

Ho khetha polokelo ea data bakeng sa Prometheus: Thanos vs VictoriaMetrics

Ha re qaleng ka Thanos. Pele o qala ho sebetsa le Thanos, o hloka ho theha bakete ho Object Storage, joalo ka S3 kapa GCS, e le hore Thanos Sidecar e ka ngola lintlha ho eona.

Ho khetha polokelo ea data bakeng sa Prometheus: Thanos vs VictoriaMetrics

Ebe bakeng sa Prometheus ka 'ngoe o hloka ho kenya Thanos Sidecar. Pele ho sena, o hloka ho hopola ho tima compaction ea data ho Prometheus. Nako le nako compaction ea data e hatella data polokelong ea lehae ea Prometheus e le ho fokotsa tšebeliso ea lisebelisoa.

Ha o kenya Thanos Sidecar ho Prometheus ea hau, o tlameha ho tima compaction ena ea data, hobane Thanos Sidecar ha e sebetse hantle ka compaction ea data e nolofalitsoeng. Sena se bolela hore Prometheus ea hau e qala ho boloka data ka li-block tsa lihora tse peli mme e emisa ho kopanya li-blocks ho tse kholoanyane. Ka hona, haeba u etsa lipotso tse fetang nako ea lihora tse peli tse fetileng, li ke ke tsa sebetsa hantle kamoo li neng li ka sebetsa kateng haeba data compaction e ne e nolofalitsoe.

Ho khetha polokelo ea data bakeng sa Prometheus: Thanos vs VictoriaMetrics

Ka hona, Thanos e khothalletsa ho fokotsa nako ea ho boloka boitsebiso sebakeng sa polokelo ea sebaka sa lihora tsa 6-8 e le ho fokotsa palo e kholo ea li-blocks tse nyenyane.

Ha u se u kentse Thanos Sidecar, u tlameha ho kenya likarolo tse peli bakeng sa Bucket e 'ngoe le e 'ngoe ea polokelo ea ntho. Tsena ke Thanos Compactor le Thanos Store Gateway.

Ho khetha polokelo ea data bakeng sa Prometheus: Thanos vs VictoriaMetrics

Ka mor'a moo, o hloka ho kenya Thanos Query le ho e lokisa e le hore e khone ho hokahanya le Thanos Store Gateways eohle eo u nang le eona, hape e ka hokahanya le Thanos Sidecars tsohle.

Ho ka ba le bothata bo fokolang mona.

Ho khetha polokelo ea data bakeng sa Prometheus: Thanos vs VictoriaMetrics

U hloka ho hlophisa khokahano e tšepahalang le e sireletsehileng ho tloha Thanos Query ho ea ho likarolo tsena. 'Me haeba Prometheus ea hau e fumaneha litsing tse fapaneng tsa data, kapa ho li-VPC tse fapaneng, joale lihokelo ho tsona tse tsoang kantle li thibetsoe. Empa hore Thanos Query e sebetse, o hloka ho hlophisa khokahano moo, mme o tlameha ho fumana tsela.

Haeba u na le litsi tse ngata tse joalo tsa data, joale, ka hona, ho tšepahala ha tsamaiso eohle ho fokotseha. Kaha Thanos Query e tlameha ho lula e boloka likhokahano ho li-Thanos Sidecars tsohle tse fumanehang litsing tse fapaneng tsa data. Bakeng sa kopo e 'ngoe le e' ngoe e tlang, e tla tsamaisa likopo ho bohle ba Thanos Sidecars. Haeba khokahano e sitisoa, u tla fumana sete e sa phethahalang ea data, kapa u tla fumana karabo ea "sehlopha se theohile".

Ho khetha polokelo ea data bakeng sa Prometheus: Thanos vs VictoriaMetrics

Ho VictoriaMetrics tsohle li bonolo haholoanyane. Bakeng sa mofuta oa Single-node, o hloka feela ho tsamaisa binary e le 'ngoe mme tsohle lia sebetsa.

Ho khetha polokelo ea data bakeng sa Prometheus: Thanos vs VictoriaMetrics

Ka mofuta oa sehlopha, ho lekane ho tsamaisa mefuta eohle e meraro e kaholimo ea likarolo ka bongata boo u bo hlokang, kapa u bo sebelisa. chate ea helm ho iketsetsa tlhahiso ea likarolo ho Kubernetes. Re boetse re rera ho etsa opareitara ea Kubernetes. Chate ea Helm ha e koahele linyeoe tse ling mme e u lumella ho ithunya leotong. Ka mohlala, e u lumella ho fokotsa palo ea li-node tsa polokelo, tse tla lebisa ho lahleheloa ke data.

Ho khetha polokelo ea data bakeng sa Prometheus: Thanos vs VictoriaMetrics

Kamora hore o hlahise mofuta o le mong oa binary kapa o kopaneng, o hloka feela ho kenyelletsa Prometheus ho config. tlhophiso ea url ea ho ngola e holee le hore e qale ho ngola data ka ho tsamaisana le polokelo ea lehae le polokelo e hole. Joalo ka ha u bona, tlhophiso ena e lokela ho sebetsa ka ts'epo ho feta ha e bapisoa le tlhophiso ea Thanos. Ha ho hlokahale hore re boloke khokahanyo ho tloha VictoriaMetrics ho ea ho Prometheus eohle, hobane Prometheus ka boeona e hokahana le VictoriaMetrics mme e fetisetsa data.

Ho khetha polokelo ea data bakeng sa Prometheus: Thanos vs VictoriaMetrics

Ha re nahaneng ka tšehetso ea Thanos le VictoriaMetrics.

Ho khetha polokelo ea data bakeng sa Prometheus: Thanos vs VictoriaMetrics

Thanos e hloka ho beha leihlo Sidecar ho etsa bonnete ba hore ha e emise ho kenya data ho Object Storage. Ba ka emisa ho jarolla data ena ka lebaka la liphoso tsa ho khoasolla, mohlala, khokahano ea marang-rang ea hau ho Object Storage e sitisoa ka nakoana, kapa Object Storage ha e fumanehe. Thanos Sidecar e tla hlokomela sena motsotsong ona, tlaleha phoso, e ka senyeha ebe e emisa ho sebetsa. Haeba u sa e behe leihlo, joale u tla emisa ho fetisetsa data ho Object Storage. Haeba nako ea ho boloka e feta (lihora tse 6-8 li khothalelitsoe), joale u tla lahleheloa ke data e sa kang ea fella ka Object Storage.

Ho khetha polokelo ea data bakeng sa Prometheus: Thanos vs VictoriaMetrics

Thanos compactors e ka emisa ho sebetsa ka lebaka la lebelo le Sidecar. Li-compactor li nka data ho Object Storage ebe li e kopanya hore e be likarolo tse kholo tsa data. Kaha li-compactor ha li lumellane le Sidecars, tse latelang li ka etsahala: Sidecar ha e e-s'o be le nako ea ho qeta thibela, Compactor e etsa qeto ea hore thibela ena e ngotsoe ka ho feletseng. Compactor e qala ho e bala. Ha e bale boloko ka botlalo mme e emisa ho sebetsa. Sheba lintlha mona.

Ho khetha polokelo ea data bakeng sa Prometheus: Thanos vs VictoriaMetrics

Store Gateway e ka khutlisa data e sa lumellaneng ka lebaka la mabelo pakeng tsa Compactor le Sidecars. Ho etsahala ntho e ts'oanang le mona, hobane Store Gateway ha e hokahane le Compactors le Sidecars ka tsela efe kapa efe. Ka hona, maemo a morabe a ka etsahala ha Store Gateway e sa bone karolo ea data kapa e bona data e sa hlokahaleng.

Ho khetha polokelo ea data bakeng sa Prometheus: Thanos vs VictoriaMetrics

Karolo ea Potso ho Thanos ka mokhoa o ikhethileng e khutlisa sephetho se sa fellang haeba Sidecars kapa Store Gateways li sa fumanehe hajoale. U tla fumana karolo ea data, 'me u ke ke ua tseba le hore ha ua fumana data eohle. Ena ke tsela eo e sebetsang ka eona ka ho sa feleng. Boemong bo ts'oanang, VictoriaMetrics e khutlisa data e tšoailoeng e le karolo.

Ho khetha polokelo ea data bakeng sa Prometheus: Thanos vs VictoriaMetrics

Ho fapana le Thanos, VictoriaMetrics ha se hangata e lahleheloang ke data. Le haeba khokahano e tsoang ho Prometheus ho VictoriaMetrics e sitisoa, sena ha se bothata, kaha Prometheus o ntse a tsoela pele ho rekota data e ncha e kenang ho Ngola Pele, eo boholo ba eona e leng lihora tse 2. Haeba u khutlisetsa khokahano ea hau ho VictoriaMetrics nakong ea lihora tse peli, data ea hau e ke ke ea lahleha. Prometheus e ka eketsa data ka mor'a ho khutlisetsa khokahanyo ho VictoriaMetrics.

Ho khetha polokelo ea data bakeng sa Prometheus: Thanos vs VictoriaMetrics

Ho fapana le Thanos, ea ngolang datha ho boloka lintho ka mor'a lihora tse peli feela, Prometheus e ikatisetsa data ka bo eona e sebelisa protocol e hole ho boloka hole, joalo ka VictoriaMetrics. Ha u tšabe ho lahleheloa ke polokelo ea lehae Prometheus. Haeba ka tšohanyetso a lahlehetsoe ke polokelo ea sebaka seo, joale boemong bo bobe ka ho fetisisa u tla lahleheloa ke metsotsoana ea ho qetela ea data e neng e se na nako ea ho ngoloa sebakeng sa polokelo e hōle.

Ho khetha polokelo ea data bakeng sa Prometheus: Thanos vs VictoriaMetrics

Kubernetes e laola sehlopha ka bo eona, ho fapana le Thanos. Ho thata ho beha likarolo tsohle tsa Thanos sehlopheng se le seng sa Kubernetes, ho fapana le likarolo tsa sehlopha sa VictoriaMetrics.

Ho khetha polokelo ea data bakeng sa Prometheus: Thanos vs VictoriaMetrics

VictoriaMetrics e na le ntlafatso e bonolo haholo ea mofuta o mocha. Emisa feela VictoriaMetrics, ntlafatsa li-binaries 'me u li qale. Ha e emisoa ka lets'oao la SIGINT, li-binaries tsohle tsa VictoriaMetrics li koala ka mokhoa o makatsang. Ba boloka data e hlokahalang ka nepo, ba koala likhokahano tse kenang ka nepo e le hore ba se ke ba lahleheloa ke letho. Kahoo u ke ke ua lahleheloa ke letho ha u ntlafatsa.

Ho khetha polokelo ea data bakeng sa Prometheus: Thanos vs VictoriaMetrics

VictoriaMetrics e etsa hore ho be bonolo haholo ho holisa sehlopha. Kenya feela likarolo tse hlokahalang 'me u tsoele pele ho sebetsa.

Ho khetha polokelo ea data bakeng sa Prometheus: Thanos vs VictoriaMetrics

Mabapi le maraba ho Thanos le VictoriaMetrics.

Ho khetha polokelo ea data bakeng sa Prometheus: Thanos vs VictoriaMetrics

Thanos e na le maraba a latelang. Prometheus e tlameha ho boloka data bakeng sa lihora tse peli tse fetileng. Haeba li lahleha, u tla lahleheloa ke tsona ka ho feletseng hobane ha li e-s'o ngoloe ho Object Storage joaloka S3.

Ho khetha polokelo ea data bakeng sa Prometheus: Thanos vs VictoriaMetrics

Karolo ea Store Gateway le karolo ea compactor e ka hloka mohopolo o mongata ho sebetsa le Object Storage e kholo haeba ho na le lifaele tse ngata tse nyenyane tse bolokiloeng moo. Ha palo le boholo ba lifaele li ntse li eketseha, Store Gateway le RAM ea komporo lia hlokahala ho boloka tlhaiso-leseling. Thanos o na le litaba tse ngata mabapi le taba eo Store Gateway le compactor crash e nang le palohare ea meqolo ea data e rekotiloeng.

Ho khetha polokelo ea data bakeng sa Prometheus: Thanos vs VictoriaMetrics

Thanos e bapatsoa hore e be tekanyo e sa lekanyetsoang ka palo ea Prometheus eo u nang le eona. Sena ha se nnete. Kaha likopo tsohle li feta karolong ea Query, e tlamehang ka nako e le 'ngoe ho khetha likarolo tsohle tsa Store Gateway le likarolo tsohle tsa Sidecar, hula data ho tloha moo ebe u e lokisa pele. Ho hlakile hore lebelo la kopo le fokotsoa ke sehokelo se fokolang ka ho fetesisa, Store Gateway e liehang ka ho fetesisa kapa Sidecar e tsamaeang butle.

Likarolo tsena li kanna tsa jarolloa ka tsela e sa lekanang. Ka mohlala, u na le Prometheus, e bokellang limilione tsa metric ka motsotsoana. Hape ho na le Prometheus, e bokellang likete tsa metrics motsotsoana. Prometheus, e bokellang limilione tsa metric ka motsotsoana, e beha mojaro o phahameng haholo ho seva eo e sebetsang ho eona. Ka hona, Sidecar e sebetsa butle moo. 'Me ka kakaretso ntho e' ngoe le e 'ngoe e sebetsa butle-butle moo. 'Me karolo ea Potso e tla hula data ho tloha moo butle haholo. Ka hona, ts'ebetso ea sehlopha sa hau kaofela e tla fokotsoa ke Sidecar ena e liehang.

Ho khetha polokelo ea data bakeng sa Prometheus: Thanos vs VictoriaMetrics

Ka ho sa feleng, Thanos e fana ka data e sa fellang haeba Sidecars tse ling le Store Gateway li le sieo. Mohlala, haeba li-Sidecars tsa hau li hasane lefatšeng ka bophara litsing tse fapaneng tsa data, monyetla oa ho hloleha ha khokahano le ho se fumanehe ha karolo o eketseha haholo. Ka hona, maemong a mangata u tla fumana data e sa fellang ntle le ho e tseba.

Ho khetha polokelo ea data bakeng sa Prometheus: Thanos vs VictoriaMetrics

VictoriaMetrics le eona e na le maraba. Leraba la pele ke khetho e lekanyetsang palo ea RAM e sebelisoang bakeng sa cache ea VictoriaMetrics. Ka tloaelo, e lekana le 60% ea RAM mochining oo VictoriaMetrics e sebetsang ho eona kapa 60% ea RAM ea VictoriaMetrics pod e Kubernetes.

Haeba o fetola boleng bona ka phoso, o ka senya ts'ebetso ea VictoriaMetrics. Mohlala, haeba o beha boleng tlase haholo, data e kanna ea se hlole e lekana cache ea VictoriaMetrics. Ka lebaka la sena, o tla tlameha ho etsa mosebetsi o eketsehileng le ho kenya processor le disk. Haeba u etsa hore khetho ena e be kholo haholo, e ea eketseha, pele, monyetla oa hore VictoriaMetrics e tla senyeha ka phoso ea mohopolo, 'me ea bobeli, e tla lebisa tabeng ea hore ho tla ba le RAM e nyenyane haholo e setseng mohopolong oa tsamaiso ea ts'ebetso. polokelo ea faele. 'Me VictoriaMetrics e itšetleha ka cache ea faele bakeng sa ts'ebetso. Haeba e sa lekana, mojaro o disk o ka eketseha haholo. Ka hona, keletso: u se ke ua fetola parameter ntle le haeba ho hlokahala.

Ho khetha polokelo ea data bakeng sa Prometheus: Thanos vs VictoriaMetrics

Khetho ea bobeli. Ena ke retentionPeriod - nako e behiloeng ho khoeli e 1 ka mokhoa oa kamehla. Bona ke bolelele ba nako VictoriaMetrics e bolokang data. Kamora nako ena, VictoriaMetrics e hlakola data.

Batho ba bangata ba tsamaisa VictoriaMetrics ntle le paramente ena mme ba rekota data khoeli kaofela. Ebe ba botsa: ke hobane'ng ha data ea khoeli e fetileng e ile ea nyamela? Hobane retentionPeriod ke khoeli e le 'ngoe. Ka hona, o hloka ho tseba le ho seta retentionPeriod e nepahetseng.

Ho khetha polokelo ea data bakeng sa Prometheus: Thanos vs VictoriaMetrics

Ha re shebeng likarolo tse ikhethang.

Ho khetha polokelo ea data bakeng sa Prometheus: Thanos vs VictoriaMetrics

Thanos e na le tšobotsi e bitsoang downsampling: metsotso e 5 le linako tsa hora, tseo hangata e sa sebetseng hantle. Haeba u google 'me u sheba taba ea bona ho github, ho na le litaba tse ngata tse amanang le ho fokotseha hona, hore ka linako tse ling ha e sebetse hantle, kapa ha e sebetse kamoo basebelisi ba lebeletseng kateng.

Ho khetha polokelo ea data bakeng sa Prometheus: Thanos vs VictoriaMetrics

Thanos e na le deduplication ea data bakeng sa lipara tsa Prometheus HA. Ha Prometheus tse peli li bokella metrics e tšoanang ho tsoa lipheong tse tšoanang 'me Thanos e li boloka ho Object Storage. Thanos e ka hlakola lintlha tsena hantle, ho fapana le VictoriaMetrics.

Ho khetha polokelo ea data bakeng sa Prometheus: Thanos vs VictoriaMetrics

Thanos e na le karolo ea tlhokomeliso e neng e le ho Thanos schematic. Empa eena ha e khothalletsoe ho sebelisoa tlhahisong.

Ho khetha polokelo ea data bakeng sa Prometheus: Thanos vs VictoriaMetrics

Thanos e na le monyetla oa hore Thanos le Prometheus ba arolelane khoutu e tšoanang. Thanos le Prometheus li ntlafatsoa ke baetsi ba tšoanang. Ka ntlafatso ho Thanos kapa Prometheus, lehlakore le leng lea hlola.

Ho khetha polokelo ea data bakeng sa Prometheus: Thanos vs VictoriaMetrics

Karolo ea mantlha ea VictoriaMetrics ke MetricsQL. Tsena ke likeketso tsa VictoriaMetrics tsa PromQL, tseo ke buileng ka tsona kopanong e kholo e fetileng ea ho beha leihlo.

Ho khetha polokelo ea data bakeng sa Prometheus: Thanos vs VictoriaMetrics

VictoriaMetrics e ts'ehetsa ho kenya data ho sebelisa liprothokholo tse ngata tse fapaneng. VictoriaMetrics e ke ke ea amohela data ho tsoa ho Prometheus feela, empa hape le ka Influx, OpenTSDB le liprothokholo tsa Graphite.

Ho khetha polokelo ea data bakeng sa Prometheus: Thanos vs VictoriaMetrics

Lintlha tsa VictoriaMetrics li nka sebaka se fokolang haholo ha se bapisoa le Thanos le Prometheus.

Haeba u rekota data ea 'nete, basebelisi ba bua ka ho fokotseha ha makhetlo a 2-5 ka boholo ba data ho disk ho bapisoa le Prometheus le Thanos.

Ho khetha polokelo ea data bakeng sa Prometheus: Thanos vs VictoriaMetrics

Monyetla o mong oa VictoriaMetrics ke hore e ntlafalitsoe bakeng sa lebelo.

Ho khetha polokelo ea data bakeng sa Prometheus: Thanos vs VictoriaMetrics

Ha re shebeng litšenyehelo tsa meaho.

Ho khetha polokelo ea data bakeng sa Prometheus: Thanos vs VictoriaMetrics

E 'ngoe ea melemo ea Thanos ke hore e boloka data polokelong ea ntho, e batlang e le theko e tlase.

Ha u boloka data polokelong ea ntho, u tlameha ho lefa bakeng sa ho ngola le ho bala lits'ebetso ($ 10 ka ts'ebetso ea milione). Ha o ngola data ho boloka ntho e itseng, o lefa litšenyehelo tsa hau tsa ho amohela bakeng sa ho kenya data ho Marang-rang; haeba sehlopha sa hau se le sieo ho AWS, ke mahala moo. Ha u bala lintlha, u lefa pakeng tsa $10 le $230 ka 1TB. Sena se ka ba bohlokoa haeba khafetsa u botsa datha ea nalane ho tsoa sehlopheng sa Thanos.

Ho khetha polokelo ea data bakeng sa Prometheus: Thanos vs VictoriaMetrics

Bakeng sa sehlopha sa Thanos, o hloka ho lefella li-server bakeng sa Compact, Store Gateway, likarolo tsa Potso tse hlokang mohopolo o mongata, le CPU bakeng sa data e ngata.

Ho khetha polokelo ea data bakeng sa Prometheus: Thanos vs VictoriaMetrics

VictoriaMetrics e na le litšenyehelo tse latelang. Haeba u boloka data ho li-drive tsa GCE HDD, e tla tsoa ho $40 bakeng sa 1TB. Bakeng sa VictoriaMetrics, li-drive tse tloaelehileng tsa HDD li lekane; ha ho li-SSD, tse bitsang makhetlo a mahlano ho feta, lia hlokahala. VictoriaMetrics e ntlafalitsoe bakeng sa HDD.

Ho khetha polokelo ea data bakeng sa Prometheus: Thanos vs VictoriaMetrics

VictoriaMetrics e hloka li-server bakeng sa likaroloana: ebang ke Sing-nod kapa likarolo tse kopaneng, tseo, ho fapana le likarolo tsa Thanos, li hlokang CPU le RAM tse nyane haholo - mme ka hona li tla ba theko e tlase.

Ho khetha polokelo ea data bakeng sa Prometheus: Thanos vs VictoriaMetrics

Mehlala ea ts'ebetsong.

Ho khetha polokelo ea data bakeng sa Prometheus: Thanos vs VictoriaMetrics

Thanos e na le mohlala oa ts'ebetsong ho Gitlab. Gitlab e sebetsa ka ho feletseng ho Thanos. Empa ha se tsohle tse boreleli hakana moo. Ha o ka ba sheba litokollo, joale u ka bona hore ba lula ba e-na le tse ling mathata a ts'ebetso le Thanos: Ha ho na mohopolo o lekaneng bakeng sa Store Gateway kapa likarolo tsa Potso. Ba tlameha ho eketsa nako ea mohopolo kamehla.

Ka lebaka lena, litšenyehelo tsa ho rarolla mathata ana lia eketseha.

Ts'ebetsong ea bobeli, e ka 'nang ea atleha haholoanyane, ke k'hamphani ea Improbable, e qalileng ho hlahisa Thanos. Ba phatlalalitse khoutu ea mohloli oa Thanos. Improbable ke k'hamphani e hlahisang lienjineri tsa papali.

Ho khetha polokelo ea data bakeng sa Prometheus: Thanos vs VictoriaMetrics

VictoriaMetrics e na le mehlala ea ts'ebetsong ea sechaba:

  • sehahi sa sebaka sa marang-rang sa wix.com
  • Adidas e sebelisa VictoriaMetrics mme e bile e etsa tlhahiso ho PromCon 2019 ea ho qetela
  • TrafficStars - marang-rang a lipapatso
  • Seznam.cz ke sebatli se tsebahalang sa Czech.

'Me joale ho ne ho e-na le lik'hamphani tse se nang mabitso tseo nke keng ka li bitsa hona joale. Ha baa ka ba lumela.

  • Moetsi e mong ea ka sehloohong oa papali. E kholo hofeta im Improbable.
  • Moetsi oa software e kholo ea litšoantšo.
  • Banka e kholo ea Russia.
  • Moetsi oa li-turbine tsa moea oa Europe ea atlehileng ho etsa liteko tsa VictoriaMetrics. Moetsi enoa o kenya tšebetsong VictoriaMetrics ho lekola lintlha tse bokelletsoeng ho tsoa ho li-turbine tsa moea ka sekhahla sa disampole tse 50 motsotsoana ka sensor. Mochine o mong le o mong oa moea o na le li-sensor tse makholo a 'maloa. Ba na le makholo a 'maloa a li-turbine tsa moea.
  • Lifofane tsa Russia tse batlang ho kenya ts'ebetsong VictoriaMetrics, empa li ntse li sa khone. Re mothating oa konteraka le bona.

Ho khetha polokelo ea data bakeng sa Prometheus: Thanos vs VictoriaMetricsLiphello.

VictoriaMetrics le Thanos li rarolla mathata a tšoanang, empa ka litsela tse fapaneng:

  • Potso ea lefats'e ka bophara
  • sekala se tshekaletseng
  • ho tshoaroa ntle ho mabaka

Ho khetha polokelo ea data bakeng sa Prometheus: Thanos vs VictoriaMetrics

Спасибо.

Re u emetse ho rona mocha oa thelekramo.

Ho khetha polokelo ea data bakeng sa Prometheus: Thanos vs VictoriaMetrics

Ke basebelisi ba ngolisitsoeng feela ba ka kenyang letsoho phuputsong. kenaka kopo.

U sebelisa eng e le polokelo ea nako e telele bakeng sa Prometheus?

  • 35,3%Thanos6

  • 0,0%Cortex0

  • 0,0%M3DB0

  • 41,2%VictoriaMetrics7

  • 23,5%tse ling4

Basebelisi ba 17 ba ile ba khetha. Basebelisi ba 16 ba ile ba hana.

Source: www.habr.com

Reka sebaka se tšepahalang sa libaka tse nang le ts'ireletso ea DDoS, li-server tsa VPS VDS 🔥 Reka sebaka se tšepahalang sa ho amohela webosaete ka tšireletso ea DDoS, li-server tsa VPS VDS | ProHoster