<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-5628326400009361051</id><updated>2025-11-02T04:58:34.520+03:00</updated><category term="Periodic Noise Matlab"/><category term="Adding and Deleting Role From SPList and SPListItem"/><category term="Bussiness Inteligance and Data Warehousing"/><category term="Changing Executable Path Of Windows Services"/><category term="Code to Deleting Folder and All Content In It From Command Promp"/><category term="Creating Linq to Sharepoint Framework"/><category term="Custom Ribbon in Sharepoint"/><category term="Custom Ribbon in Sharepoint 2010"/><category term="Deserialize"/><category term="Duyma Engelliler İçin Proje"/><category term="Frekans Bölgesi ve Fourier Dönüşümü"/><category term="Gazi Üniversitesi"/><category term="HTML Filtering"/><category term="How To Install Oracle Bussiness Intelligence Virtual Machine"/><category term="Median Filter For Salt and Papper Noise"/><category term="Mehmet Yoldaş"/><category term="Periodic Noise Reduction by Frequency Domain Filtering"/><category term="Proje yarışması"/><category term="Proxy Pattern"/><category term="Replacing operation from html content"/><category term="RoleAssignments"/><category term="Serilizing objects to string and Deserilizing objects from string"/><category term="Sharepoint role Sharepoint role programatically"/><category term="XmlSerializer"/><category term="getting all tables row count"/><category term="İzin Yönetimi"/><category term="İşitme Engelliler İçin Cilt Üzerine Dokunma Duyusu İle Morse Alfabesi Kullanarak Konuşması"/><title type='text'>Software Blog</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://mehmetyoldas.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5628326400009361051/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://mehmetyoldas.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/5628326400009361051/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Mehmet Yoldaş</name><uri>http://www.blogger.com/profile/17372934623166164299</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVw6x10V3awMwQJFzrhYEEvr-YMR-YcaKARcY29nS8Ny67irGfpUKqZ4uvXuwn6LQhPqNtJq5NQ4rkOE0x29vlgd4UNHA9D6B3uo8_D6VU7-5TZyDRRW-W6MAgLjn7DA/s220/profil+Ba%C5%9Fak+Foto%C4%9Fraf%C3%A7%C4%B1l%C4%B1k.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>53</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5628326400009361051.post-5957145825601689804</id><published>2025-03-07T03:52:00.000+03:00</published><updated>2025-03-07T03:52:01.131+03:00</updated><title type='text'>Bir ekip lideri nelere dikkat etmeli</title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;strong data-end=&quot;110&quot; data-start=&quot;70&quot;&gt;1. Dijital Dönüşüm Süreçlerine Katkı&lt;/strong&gt;&lt;/p&gt;
&lt;p data-end=&quot;581&quot; data-start=&quot;112&quot;&gt;Dijital dönüşüm süreçlerine katkı sağlamak, beni heyecanlandıran bir konu. Bu süreçlerde, özellikle verimlilik artırıcı çözümler geliştirmek ve dijital altyapıyı güçlendirmek için yenilikçi fikirler sunuyorum. Hem yazılım geliştirme hem de kullanıcı deneyimi üzerine yapılan iyileştirmelerle bu süreçlerin hızlanmasını sağlıyorum. Örneğin, micro hizmet mimarisi ve container teknolojileri gibi modern yazılım yaklaşımlarıyla dijital dönüşümü hızlandırmayı hedefliyorum.&lt;/p&gt;
&lt;hr data-end=&quot;586&quot; data-start=&quot;583&quot; /&gt;
&lt;p data-end=&quot;636&quot; data-start=&quot;588&quot;&gt;&lt;strong data-end=&quot;636&quot; data-start=&quot;588&quot;&gt;2. Yazılım Geliştirme Süreçlerindeki Deneyim&lt;/strong&gt;&lt;/p&gt;
&lt;p data-end=&quot;961&quot; data-start=&quot;638&quot;&gt;Yazılım geliştirme süreçlerinde, Agile ve Scrum metodolojilerini tercih ediyorum. Bu metodolojilerin esnekliği, projelere hız katmak ve işbirliği içinde çalışan takımlar oluşturmak adına önemli bir avantaj sağlıyor. Süreç boyunca sürekli iletişim ve düzenli geri bildirim alarak projeleri daha verimli bir şekilde yönettim.&lt;/p&gt;
&lt;hr data-end=&quot;966&quot; data-start=&quot;963&quot; /&gt;
&lt;p data-end=&quot;1009&quot; data-start=&quot;968&quot;&gt;&lt;strong data-end=&quot;1009&quot; data-start=&quot;968&quot;&gt;3. Scrum ve Kanban Arasındaki Farklar&lt;/strong&gt;&lt;/p&gt;
&lt;p data-end=&quot;1348&quot; data-start=&quot;1011&quot;&gt;Scrum ve Kanban arasındaki farkları, projelerin gereksinimlerine göre değerlendiriyorum. Scrum, daha çok değişime açık ve modüler projeler için uygundur. Kanban ise daha az değişkenlik olan, sabit zaman çizelgeleri belirli projeler için uygundur. Scrum, her sprint sonunda teslimat ve geribildirim alırken, Kanban sürekli akışla çalışır.&lt;/p&gt;
&lt;hr data-end=&quot;1353&quot; data-start=&quot;1350&quot; /&gt;
&lt;p data-end=&quot;1397&quot; data-start=&quot;1355&quot;&gt;&lt;strong data-end=&quot;1397&quot; data-start=&quot;1355&quot;&gt;4. Karşılaşılan Zorluklarla Başa Çıkma&lt;/strong&gt;&lt;/p&gt;
&lt;p data-end=&quot;1740&quot; data-start=&quot;1399&quot;&gt;Proje süreçlerinde karşılaşılan zorlukları, ekip arkadaşlarımla birlikte çözüme kavuştururum. Takım üyelerinin güçlü yönlerini bilerek görevleri dağıtmak ve açık iletişimle çözüm aramak, bu zorluklarla başa çıkmada çok önemli bir strateji. Ayrıca, teknik anlamda derinlemesine çözümleme yaparak, probleme özgü yaratıcı çözümler geliştiririm.&lt;/p&gt;
&lt;hr data-end=&quot;1745&quot; data-start=&quot;1742&quot; /&gt;
&lt;p data-end=&quot;1768&quot; data-start=&quot;1747&quot;&gt;&lt;strong data-end=&quot;1768&quot; data-start=&quot;1747&quot;&gt;5. Liderlik Tarzı&lt;/strong&gt;&lt;/p&gt;
&lt;p data-end=&quot;2051&quot; data-start=&quot;1770&quot;&gt;Liderlik tarzım, empati ve işbirliği odaklıdır. Takım üyelerinin güçlü yönlerine göre görev dağılımı yaparak, onların işlerinden keyif almalarını ve projeye sahiplenmelerini sağlarım. Bununla birlikte, her zaman geri bildirim alarak ekip dinamiklerine uygun yönlendirmeler yaparım.&lt;/p&gt;
&lt;hr data-end=&quot;2056&quot; data-start=&quot;2053&quot; /&gt;
&lt;p data-end=&quot;2104&quot; data-start=&quot;2058&quot;&gt;&lt;strong data-end=&quot;2104&quot; data-start=&quot;2058&quot;&gt;6. Proje Yönetimindeki En Önemli Faktörler&lt;/strong&gt;&lt;/p&gt;
&lt;p data-end=&quot;2394&quot; data-start=&quot;2106&quot;&gt;Proje yönetiminde, her şeyden önce planlama, iletişim ve esneklik çok önemli. Proje başlangıcında iyi bir analiz yaparak yol haritası oluştururum. Ayrıca, projelerdeki değişikliklere hızlıca uyum sağlamak için esnek olmanın ve sürekli iletişimde kalmanın başarıyı artırdığını düşünüyorum.&lt;/p&gt;
&lt;hr data-end=&quot;2399&quot; data-start=&quot;2396&quot; /&gt;
&lt;p data-end=&quot;2451&quot; data-start=&quot;2401&quot;&gt;&lt;strong data-end=&quot;2451&quot; data-start=&quot;2401&quot;&gt;7. Yeni Teknolojilerle İlgili Takip Stratejisi&lt;/strong&gt;&lt;/p&gt;
&lt;p data-end=&quot;2782&quot; data-start=&quot;2453&quot;&gt;Yeni teknolojileri sürekli olarak araştırırım. Bloglar, LinkedIn ve teknoloji seminerleri bu konuda takip ettiğim başlıca kaynaklardır. Öne çıkan isimler ve şirketler hakkında içerikler okuyarak, dijital dünyadaki gelişmeleri yakından takip ederim. Bu sayede teknolojik yenilikleri projelere entegre ederek verimliliği artırırım.&lt;/p&gt;
&lt;hr data-end=&quot;2787&quot; data-start=&quot;2784&quot; /&gt;
&lt;p data-end=&quot;2834&quot; data-start=&quot;2789&quot;&gt;&lt;strong data-end=&quot;2834&quot; data-start=&quot;2789&quot;&gt;8. Ekipte Etkili İletişim Sağlama Yolları&lt;/strong&gt;&lt;/p&gt;
&lt;p data-end=&quot;3135&quot; data-start=&quot;2836&quot;&gt;Ekip içindeki iletişimi, açık ve dürüst bir şekilde yönetmeye özen gösteririm. Düzenli toplantılar yaparak her ekip üyesinin görüşünü alır, ihtiyaç duydukları konularda onlara destek olurum. Ayrıca, başarıların kutlanması ve karşılaşılan sorunların hızlıca çözülmesi de etkili iletişimi güçlendirir.&lt;/p&gt;
&lt;hr data-end=&quot;3140&quot; data-start=&quot;3137&quot; /&gt;
&lt;p data-end=&quot;3189&quot; data-start=&quot;3142&quot;&gt;&lt;strong data-end=&quot;3189&quot; data-start=&quot;3142&quot;&gt;9. Takımınızın Yetenekleri ve Güçlü Yönleri&lt;/strong&gt;&lt;/p&gt;
&lt;p data-end=&quot;3491&quot; data-start=&quot;3191&quot;&gt;Takımımda, farklı disiplinlerden gelen ve farklı yeteneklere sahip bireyler bulunuyor. Bu çeşitlilik, projelerde daha yaratıcı ve yenilikçi çözümler üretilmesini sağlıyor. Her bireyin güçlü yönlerini göz önünde bulundurarak görev dağılımı yapar ve takımın potansiyelini en verimli şekilde kullanırım.&lt;/p&gt;
&lt;hr data-end=&quot;3496&quot; data-start=&quot;3493&quot; /&gt;
&lt;p data-end=&quot;3550&quot; data-start=&quot;3498&quot;&gt;&lt;strong data-end=&quot;3550&quot; data-start=&quot;3498&quot;&gt;10. Yazılım Geliştirme Araçları ve Teknolojileri&lt;/strong&gt;&lt;/p&gt;
&lt;p data-end=&quot;3845&quot; data-start=&quot;3552&quot;&gt;C#, .Net Core, Redis, RabbitMQ ve Docker gibi teknolojilerle geniş bir yelpazeye sahip bir deneyimim var. Ayrıca, test araçları ve CI/CD süreçleri hakkında da derinlemesine bilgi sahibiyim. Bu araçlar sayesinde yazılım geliştirme süreçlerini hızlandırarak, yüksek kaliteli çözümler üretiyorum.&lt;/p&gt;
&lt;hr data-end=&quot;3850&quot; data-start=&quot;3847&quot; /&gt;
&lt;p data-end=&quot;3887&quot; data-start=&quot;3852&quot;&gt;&lt;strong data-end=&quot;3887&quot; data-start=&quot;3852&quot;&gt;11. Agile Metodolojisi Uygulama&lt;/strong&gt;&lt;/p&gt;
&lt;p data-end=&quot;4217&quot; data-start=&quot;3889&quot;&gt;Agile metodolojisiyle çalışırken, sprintlere dayalı bir yaklaşım benimsiyorum. Her sprint sonunda, takımın ve projenin gelişim durumunu değerlendirir, gerektiğinde yön değişiklikleri yaparız. Sürekli geri bildirim almak, projelerin hızlıca gelişmesini sağlar ve her sprint sonunda yeni özellikler veya güncellemelerle ilerleriz.&lt;/p&gt;
&lt;hr data-end=&quot;4222&quot; data-start=&quot;4219&quot; /&gt;
&lt;p data-end=&quot;4267&quot; data-start=&quot;4224&quot;&gt;&lt;strong data-end=&quot;4267&quot; data-start=&quot;4224&quot;&gt;12. Yazılım Mimarisi ile İlgili Konular&lt;/strong&gt;&lt;/p&gt;
&lt;p data-end=&quot;4572&quot; data-start=&quot;4269&quot;&gt;Yazılım mimarisi, projelerin sürdürülebilirliğini ve ölçeklenebilirliğini doğrudan etkiler. Modüler yapılar, yüksek test edilebilirlik ve esneklik, benim için önemli kriterlerdir. Ayrıca, mikro servisler ve container teknolojileri ile yazılımın daha dayanıklı ve kolay yönetilebilir olmasını sağlıyorum.&lt;/p&gt;
&lt;hr data-end=&quot;4577&quot; data-start=&quot;4574&quot; /&gt;
&lt;p data-end=&quot;4611&quot; data-start=&quot;4579&quot;&gt;&lt;strong data-end=&quot;4611&quot; data-start=&quot;4579&quot;&gt;13. Performans Optimizasyonu&lt;/strong&gt;&lt;/p&gt;
&lt;p data-end=&quot;4877&quot; data-start=&quot;4613&quot;&gt;Performans optimizasyonu yaparken, öncelikle bottleneck noktalarını analiz ederim. Sonrasında bu bölgelerde yapılan iyileştirmelerle, yazılımın hızını ve verimliliğini artırırım. Ayrıca, yazılımın her aşamasında testler yaparak, optimizasyonların etkisini izlerim.&lt;/p&gt;
&lt;hr data-end=&quot;4882&quot; data-start=&quot;4879&quot; /&gt;
&lt;p data-end=&quot;4926&quot; data-start=&quot;4884&quot;&gt;&lt;strong data-end=&quot;4926&quot; data-start=&quot;4884&quot;&gt;14. Liderlik Zorlukları ile Başa Çıkma&lt;/strong&gt;&lt;/p&gt;
&lt;p data-end=&quot;5208&quot; data-start=&quot;4928&quot;&gt;Ekip içinde liderlik yaparken zorluklarla karşılaştığımda, herkesi dinler ve ortak bir çözüm yolu bulmaya çalışırım. Çeşitli görüşleri dikkate alarak ve empati yaparak en uygun çözümü geliştirmeye özen gösteririm. Çözüm odaklı yaklaşım ve açık iletişim bu süreçte büyük rol oynar.&lt;/p&gt;
&lt;hr data-end=&quot;5213&quot; data-start=&quot;5210&quot; /&gt;
&lt;p data-end=&quot;5261&quot; data-start=&quot;5215&quot;&gt;&lt;strong data-end=&quot;5261&quot; data-start=&quot;5215&quot;&gt;15. Projelerde En Büyük Başarıyı Tanımlama&lt;/strong&gt;&lt;/p&gt;
&lt;p data-end=&quot;5523&quot; data-start=&quot;5263&quot;&gt;Projelerdeki en büyük başarı, kullanıcıların ve takımın ihtiyaçlarını karşılayan, çözüm odaklı bir sonuç elde etmektir. Başarı, tüm paydaşların memnuniyetini sağlamaktan geçer. Kullanıcı dostu çözümler ve kaliteli yazılımlar ortaya koymak bu başarıyı tanımlar.&lt;/p&gt;
&lt;hr data-end=&quot;5528&quot; data-start=&quot;5525&quot; /&gt;
&lt;p data-end=&quot;5577&quot; data-start=&quot;5530&quot;&gt;&lt;strong data-end=&quot;5577&quot; data-start=&quot;5530&quot;&gt;16. Geliştirilen Yazılımların Fonksiyonları&lt;/strong&gt;&lt;/p&gt;
&lt;p data-end=&quot;5881&quot; data-start=&quot;5579&quot;&gt;Geliştirdiğimiz yazılımlar, kullanıcı deneyimini iyileştirmeyi hedefleyen özelliklerle donatılmıştır. Performans optimizasyonları, hızlı veri işleme ve kullanıcı dostu arayüzler gibi özellikler yazılımlarımızda ön planda yer alır. Ayrıca, yüksek güvenlik önlemleri ve veri koruma çözümleri de sağlanır.&lt;/p&gt;
&lt;hr data-end=&quot;5886&quot; data-start=&quot;5883&quot; /&gt;
&lt;p data-end=&quot;5942&quot; data-start=&quot;5888&quot;&gt;&lt;strong data-end=&quot;5942&quot; data-start=&quot;5888&quot;&gt;17. İleri Düzey Yazılım Dillerinde Bilgi Kullanımı&lt;/strong&gt;&lt;/p&gt;
&lt;p data-end=&quot;6247&quot; data-start=&quot;5944&quot;&gt;İleri düzey yazılım dillerindeki bilgimi, modüler ve sürdürülebilir yazılım çözümleri üretmek için kullanıyorum. C# ve .Net Core gibi dillerde, verimli ve sürdürülebilir kod yapıları geliştirerek projelerin kalitesini artırırım. Ayrıca yeni yazılım dillerine olan ilgimle sürekli öğrenmeye devam ederim.&lt;/p&gt;
&lt;hr data-end=&quot;6252&quot; data-start=&quot;6249&quot; /&gt;
&lt;p data-end=&quot;6307&quot; data-start=&quot;6254&quot;&gt;&lt;strong data-end=&quot;6307&quot; data-start=&quot;6254&quot;&gt;18. Takım İletişimini Güçlendirmek İçin Yöntemler&lt;/strong&gt;&lt;/p&gt;
&lt;p data-end=&quot;6559&quot; data-start=&quot;6309&quot;&gt;Etkili iletişim için düzenli toplantılar yapar ve her takım üyesinin görüşlerine değer veririm. Ayrıca, takım üyelerinin başarılarını kutlayarak moral artırıcı bir ortam oluştururum. Açık iletişim ve karşılıklı saygı, ekip içindeki güveni pekiştirir.&lt;/p&gt;
&lt;hr data-end=&quot;6564&quot; data-start=&quot;6561&quot; /&gt;
&lt;p data-end=&quot;6620&quot; data-start=&quot;6566&quot;&gt;&lt;strong data-end=&quot;6620&quot; data-start=&quot;6566&quot;&gt;19. Yeni Teknolojilerle Araştırma Yapma Yöntemleri&lt;/strong&gt;&lt;/p&gt;
&lt;p data-end=&quot;6938&quot; data-start=&quot;6622&quot;&gt;Yeni teknolojilerle ilgili araştırmalarımı, sektördeki lider isimleri takip ederek ve yayınlanan makaleleri okuyarak yapıyorum. Ayrıca uygulamalı çalışmalara katılarak yeni teknolojileri test ediyorum ve projelere entegre ediyorum. Bu sayede, yazılım süreçlerindeki yenilikçi çözümleri sürekli olarak takip ediyorum.&lt;/p&gt;
&lt;hr data-end=&quot;6943&quot; data-start=&quot;6940&quot; /&gt;
&lt;p data-end=&quot;6988&quot; data-start=&quot;6945&quot;&gt;&lt;strong data-end=&quot;6988&quot; data-start=&quot;6945&quot;&gt;20. Proje Süreci ve Organizasyon Yapısı&lt;/strong&gt;&lt;/p&gt;
&lt;p data-end=&quot;7233&quot; data-start=&quot;6990&quot;&gt;Proje sürecinde, başlangıçta detaylı bir planlama yaparak, her modül için açık görev tanımları belirliyorum. Ekip üyeleriyle birlikte her hafta düzenli toplantılar yaparak ilerlememizi takip ediyor ve gerektiğinde yön değişiklikleri yapıyoruz.&lt;/p&gt;
&lt;hr data-end=&quot;7238&quot; data-start=&quot;7235&quot; /&gt;
&lt;p data-end=&quot;7284&quot; data-start=&quot;7240&quot;&gt;&lt;strong data-end=&quot;7284&quot; data-start=&quot;7240&quot;&gt;21. Takımın Yetenekleri ve Güçlü Yönleri&lt;/strong&gt;&lt;/p&gt;
&lt;p data-end=&quot;7566&quot; data-start=&quot;7286&quot;&gt;Takımımda her bireyin farklı bir yeteneği ve güçlü yönü bulunuyor. Bu çeşitlilik, projelerde daha yaratıcı ve yenilikçi çözümler üretilmesini sağlıyor. Her bireyin güçlü yönlerini göz önünde bulundurarak görev dağılımı yapar ve takımın potansiyelini en verimli şekilde kullanırım.&lt;/p&gt;
&lt;hr data-end=&quot;7571&quot; data-start=&quot;7568&quot; /&gt;
&lt;p data-end=&quot;7628&quot; data-start=&quot;7573&quot;&gt;&lt;strong data-end=&quot;7628&quot; data-start=&quot;7573&quot;&gt;22. Hedeflere Ulaşırken Karşılaşılan Engelleri Aşma&lt;/strong&gt;&lt;/p&gt;
&lt;p data-end=&quot;7861&quot; data-start=&quot;7630&quot;&gt;Engelleri aşarken çözüm odaklı düşünmeye özen gösteririm. Her bir engeli, detaylı analiz ederek ve takım arkadaşlarımın görüşlerini dikkate alarak çözmeye çalışırım. Takım ruhu içinde her engel, birlikte aşılabilecek bir zorluktur.&lt;/p&gt;
&lt;hr data-end=&quot;7866&quot; data-start=&quot;7863&quot; /&gt;
&lt;p data-end=&quot;7912&quot; data-start=&quot;7868&quot;&gt;&lt;strong data-end=&quot;7912&quot; data-start=&quot;7868&quot;&gt;23. Yazılımda Performans İyileştirmeleri&lt;/strong&gt;&lt;/p&gt;
&lt;p data-end=&quot;8138&quot; data-start=&quot;7914&quot;&gt;Performans iyileştirmeleri yaparken, öncelikle hangi modüllerin daha fazla kaynak tükettiğini tespit ederim. Bu analizlerden sonra, yazılımın hızını artıracak optimizasyonlar yaparak, performansı daha verimli hale getiririm.&lt;/p&gt;
&lt;hr data-end=&quot;8143&quot; data-start=&quot;8140&quot; /&gt;
&lt;p data-end=&quot;8202&quot; data-start=&quot;8145&quot;&gt;&lt;strong data-end=&quot;8202&quot; data-start=&quot;8145&quot;&gt;24. Yeni Teknolojilerle İlgili Takip Edilen Kaynaklar&lt;/strong&gt;&lt;/p&gt;
&lt;p data-end=&quot;8429&quot; data-start=&quot;8204&quot;&gt;Yeni teknolojilerle ilgili bloglar, LinkedIn grupları, seminerler ve online kurslar gibi kaynakları düzenli olarak takip ederim. Bu kaynaklar sayesinde sektördeki yenilikleri hızlıca öğreniyor ve projelerime entegre ediyorum.&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://mehmetyoldas.blogspot.com/feeds/5957145825601689804/comments/default' title='Kayıt Yorumları'/><link rel='replies' type='text/html' href='http://mehmetyoldas.blogspot.com/2025/03/bir-ekip-lideri-nelere-dikkat-etmeli.html#comment-form' title='0 Yorum'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5628326400009361051/posts/default/5957145825601689804'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5628326400009361051/posts/default/5957145825601689804'/><link rel='alternate' type='text/html' href='http://mehmetyoldas.blogspot.com/2025/03/bir-ekip-lideri-nelere-dikkat-etmeli.html' title='Bir ekip lideri nelere dikkat etmeli'/><author><name>Mehmet Yoldaş</name><uri>http://www.blogger.com/profile/17372934623166164299</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVw6x10V3awMwQJFzrhYEEvr-YMR-YcaKARcY29nS8Ny67irGfpUKqZ4uvXuwn6LQhPqNtJq5NQ4rkOE0x29vlgd4UNHA9D6B3uo8_D6VU7-5TZyDRRW-W6MAgLjn7DA/s220/profil+Ba%C5%9Fak+Foto%C4%9Fraf%C3%A7%C4%B1l%C4%B1k.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5628326400009361051.post-1160029549220170924</id><published>2025-03-06T17:07:00.006+03:00</published><updated>2025-03-06T17:22:27.565+03:00</updated><title type='text'>SCRUM VE KANBAN ARASINDAKİ FARKLAR</title><content type='html'>&lt;div&gt;&lt;div&gt;&lt;b&gt;Scrum ve Kanban yaklaşımlarından hangisinin daha uygun olduğunu belirleyen faktörler şunlardır:&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Projenin türü:&lt;/b&gt; Bazı projeler, belirgin başlangıç ve bitiş tarihlerine sahipken, diğerleri sürekli olarak değişen gereksinimlere sahiptir. Scrum, sürekli olarak değişen gereksinimlere sahip projeler için daha uygundur. Kanban, belirgin başlangıç ve bitiş tarihlerine sahip projeler için daha uygundur.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Projenin karmaşıklığı: &lt;/b&gt;Bazı projeler, basit ve anlaşılması kolaydır. Diğerleri karmaşık ve çok yönlüdür. Scrum, karmaşık ve çok yönlü projeler için daha uygundur. Kanban, basit ve anlaşılması kolay projeler için daha uygundur.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Projenin ekibi: &lt;/b&gt;Scrumda önerilen ekip kapasitesi 3 ile 9 kişi arasındadır. Kanban da ise herhangi bir kişi sayısı limiti yoktur.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Genellikle, Scrum’ı daha büyük, çok yönlü ve nitelikli projeler için tercih ederim çünkü bu tür projelerde sürekli değişim, revizyon ve iterasyon gereklidir. Scrum, modüler yapısı sayesinde esneklik sunar ve takımın her sprintte daha verimli bir şekilde çalışmasına olanak tanır. Örneğin, proje modüllerinde sık değişiklikler olabileceği durumlarda Scrum oldukça etkili olur. Kanban ise daha basit ve başlangıç/bitiş tarihleri net olan projeler için ideal bir yaklaşımdır. Genellikle, sabit süreçlerin olduğu projelerde Kanban’ı tercih ederim çünkü süreçlerin daha öngörülebilir ve zaman yönetiminin net olması gerekmektedir. Her iki metodolojiyi de projenin gereksinimlerine göre en verimli şekilde uygulayarak, takımların verimliliğini artırmayı hedeflerim&lt;/div&gt;
&lt;b&gt;&lt;b&gt;&lt;/b&gt;&lt;/b&gt;</content><link rel='replies' type='application/atom+xml' href='http://mehmetyoldas.blogspot.com/feeds/1160029549220170924/comments/default' title='Kayıt Yorumları'/><link rel='replies' type='text/html' href='http://mehmetyoldas.blogspot.com/2025/03/scrum-ve-kanban-arasindaki-farklar.html#comment-form' title='0 Yorum'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5628326400009361051/posts/default/1160029549220170924'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5628326400009361051/posts/default/1160029549220170924'/><link rel='alternate' type='text/html' href='http://mehmetyoldas.blogspot.com/2025/03/scrum-ve-kanban-arasindaki-farklar.html' title='SCRUM VE KANBAN ARASINDAKİ FARKLAR'/><author><name>Mehmet Yoldaş</name><uri>http://www.blogger.com/profile/17372934623166164299</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVw6x10V3awMwQJFzrhYEEvr-YMR-YcaKARcY29nS8Ny67irGfpUKqZ4uvXuwn6LQhPqNtJq5NQ4rkOE0x29vlgd4UNHA9D6B3uo8_D6VU7-5TZyDRRW-W6MAgLjn7DA/s220/profil+Ba%C5%9Fak+Foto%C4%9Fraf%C3%A7%C4%B1l%C4%B1k.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5628326400009361051.post-7816191802423726802</id><published>2025-03-04T01:43:00.002+03:00</published><updated>2025-03-04T01:45:28.336+03:00</updated><title type='text'>Understanding Kubernetes Autoscaling</title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;b style=&quot;color: #3f4250; font-family: &amp;quot;var font-inter&amp;quot;; font-size: 14pt; text-transform: uppercase;&quot;&gt;Table
of contents&lt;/b&gt;&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;p style=&quot;border: none; margin-bottom: 0in; orphans: 2; padding: 0in; widows: 2;&quot;&gt;
	&lt;a href=&quot;https://www.scaleway.com/en/blog/understanding-kubernetes-autoscaling/#main&quot;&gt;&lt;span style=&quot;font-variant: normal;&quot;&gt;&lt;span style=&quot;color: #3f4250;&quot;&gt;&lt;span style=&quot;text-decoration: none;&quot;&gt;&lt;span face=&quot;Inter, Inter Fallback, ui-sans-serif, system-ui, apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-style: normal;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;background: transparent;&quot;&gt;Introduction&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;
	&lt;/li&gt;&lt;li&gt;&lt;p style=&quot;border: none; margin-bottom: 0in; orphans: 2; padding: 0in; widows: 2;&quot;&gt;
	&lt;a href=&quot;https://www.scaleway.com/en/blog/understanding-kubernetes-autoscaling/#kubernetes-architecture&quot;&gt;&lt;span style=&quot;font-variant: normal;&quot;&gt;&lt;span style=&quot;color: #3f4250;&quot;&gt;&lt;span style=&quot;text-decoration: none;&quot;&gt;&lt;span face=&quot;Inter, Inter Fallback, ui-sans-serif, system-ui, apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-style: normal;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;background: transparent;&quot;&gt;Kubernetes
	Architecture&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;
	&lt;/li&gt;&lt;li&gt;&lt;p style=&quot;border: none; margin-bottom: 0in; orphans: 2; padding: 0in; widows: 2;&quot;&gt;
	&lt;a href=&quot;https://www.scaleway.com/en/blog/understanding-kubernetes-autoscaling/#horizontal-vs-vertical-scaling&quot;&gt;&lt;span style=&quot;font-variant: normal;&quot;&gt;&lt;span style=&quot;color: #3f4250;&quot;&gt;&lt;span style=&quot;text-decoration: none;&quot;&gt;&lt;span face=&quot;Inter, Inter Fallback, ui-sans-serif, system-ui, apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-style: normal;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;background: transparent;&quot;&gt;Horizontal
	vs. Vertical Scaling&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;
	&lt;/li&gt;&lt;li&gt;&lt;p style=&quot;border-bottom: none; border-left: 2.4pt solid rgb(0, 0, 0); border-right: none; border-top: none; margin-bottom: 0in; orphans: 2; padding-bottom: 0in; padding-left: 0.02in; padding-right: 0in; padding-top: 0in; padding: 0in 0in 0in 0.02in; widows: 2;&quot;&gt;
	&lt;a href=&quot;https://www.scaleway.com/en/blog/understanding-kubernetes-autoscaling/#configuring-autoscaling&quot;&gt;&lt;span style=&quot;font-variant: normal;&quot;&gt;&lt;span style=&quot;color: orange;&quot;&gt;&lt;span style=&quot;text-decoration: none;&quot;&gt;&lt;span face=&quot;Inter, Inter Fallback, ui-sans-serif, system-ui, apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-style: normal;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;background: transparent;&quot;&gt;Configuring
	Autoscaling&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;
	&lt;/li&gt;&lt;li&gt;&lt;p style=&quot;border: none; orphans: 2; padding: 0in; widows: 2;&quot;&gt;&lt;a href=&quot;https://www.scaleway.com/en/blog/understanding-kubernetes-autoscaling/#conclusion&quot;&gt;&lt;span style=&quot;font-variant: normal;&quot;&gt;&lt;span style=&quot;color: #3f4250;&quot;&gt;&lt;span style=&quot;text-decoration: none;&quot;&gt;&lt;span face=&quot;Inter, Inter Fallback, ui-sans-serif, system-ui, apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-style: normal;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;background: transparent;&quot;&gt;Conclusion&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;&lt;/ul&gt;
&lt;p style=&quot;font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 180%; margin-bottom: 0in; orphans: 2; widows: 2;&quot;&gt;
&lt;span style=&quot;color: #3f4250;&quot;&gt;&lt;span face=&quot;Inter, Inter Fallback, ui-sans-serif, system-ui, apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;Kubernetes
provides a series of features to ensure your clusters have the right
size to handle any type of load. In this blog post, we will look into
the different auto-scaling tools provided by Kubernetes and learn the
difference between the horizontal pod autoscaler, the vertical pod
autoscaler and Kubernetes Nodes autoscaler.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 180%; margin-bottom: 0in; orphans: 2; widows: 2;&quot;&gt;
&lt;span style=&quot;color: #3f4250;&quot;&gt;&lt;span face=&quot;Inter, Inter Fallback, ui-sans-serif, system-ui, apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;Developers
use Kubernetes to ship faster to their users and respond to their
requests as quickly as possible. You design the capacity of your
cluster on the estimated load your users will generate on it. But
imagine your service went viral, and the number of requests grows
faster than you ever imagined. You risk running out of compute
resources, your service might slow down, and users may get
frustrated.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 180%; margin-bottom: 0in; orphans: 2; widows: 2;&quot;&gt;
&lt;span style=&quot;color: #3f4250;&quot;&gt;&lt;span face=&quot;Inter, Inter Fallback, ui-sans-serif, system-ui, apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;When
you allocate resources manually, your responses may not be as quick
as required by your application&#39;s changing needs. This is were
Kubernetes Autoscaling comes in: Kubernetes provides multiple layers
of autoscaling functionality: Pod-based scaling with the Horizontal
Pod Autoscaler and the Vertical Pod Autoscaler, as well as node-based
with the Cluster Autoscaler. It automatically scales up your cluster
as soon as you need it and scales it back down to its regular size
when the load is lower. These layers ensure that each pod and cluster
has the right performance to serve your current needs.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h2 class=&quot;western&quot; style=&quot;font-style: normal; font-variant: normal; letter-spacing: normal; line-height: 180%; orphans: 2; widows: 2;&quot;&gt;&lt;a name=&quot;kubernetes-architecture&quot;&gt;&lt;/a&gt;
&lt;span style=&quot;color: #3f4250;&quot;&gt;&lt;span face=&quot;var font-space-grotesk&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;b&gt;Kubernetes
Architecture&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;p style=&quot;line-height: 180%; margin-bottom: 0in; orphans: 2; widows: 2;&quot;&gt;
&lt;span style=&quot;font-variant: normal;&quot;&gt;&lt;span style=&quot;color: #3f4250;&quot;&gt;&lt;span face=&quot;Inter, Inter Fallback, ui-sans-serif, system-ui, apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-style: normal;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;In
Kubernetes, a set of machines for running containerized applications
is called&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;strong&gt;&lt;span style=&quot;font-variant: normal;&quot;&gt;&lt;span style=&quot;color: #3f4250;&quot;&gt;&lt;span face=&quot;var font-inter&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-style: normal;&quot;&gt;&lt;b&gt;Cluster&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;font-variant: normal;&quot;&gt;&lt;span style=&quot;color: #3f4250;&quot;&gt;&lt;span face=&quot;Inter, Inter Fallback, ui-sans-serif, system-ui, apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-style: normal;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;.
A cluster contains, at minimum, a&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;strong&gt;&lt;span style=&quot;font-variant: normal;&quot;&gt;&lt;span style=&quot;color: #3f4250;&quot;&gt;&lt;span face=&quot;var font-inter&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-style: normal;&quot;&gt;&lt;b&gt;Control
Plane&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;font-variant: normal;&quot;&gt;&lt;span style=&quot;color: #3f4250;&quot;&gt;&lt;span face=&quot;Inter, Inter Fallback, ui-sans-serif, system-ui, apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-style: normal;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;and
one or several&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;strong&gt;&lt;span style=&quot;font-variant: normal;&quot;&gt;&lt;span style=&quot;color: #3f4250;&quot;&gt;&lt;span face=&quot;var font-inter&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-style: normal;&quot;&gt;&lt;b&gt;Nodes&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;font-variant: normal;&quot;&gt;&lt;span style=&quot;color: #3f4250;&quot;&gt;&lt;span face=&quot;Inter, Inter Fallback, ui-sans-serif, system-ui, apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-style: normal;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;.
The control plane maintains the clusters&#39; desired state, such as
which applications run on them and which images they use. The nodes
are either virtual or physical machines that run the applications and
workloads, called&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;strong&gt;&lt;span style=&quot;font-variant: normal;&quot;&gt;&lt;span style=&quot;color: #3f4250;&quot;&gt;&lt;span face=&quot;var font-inter&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-style: normal;&quot;&gt;&lt;b&gt;Pods&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;font-variant: normal;&quot;&gt;&lt;span style=&quot;color: #3f4250;&quot;&gt;&lt;span face=&quot;Inter, Inter Fallback, ui-sans-serif, system-ui, apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-style: normal;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;.
Pods consist of containers that request compute resources such as
CPU, Memory, or GPU.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; widows: 2;&quot;&gt;
&lt;span class=&quot;sd-abs-pos&quot; style=&quot;left: 0in; position: absolute; width: 778px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #3f4250;&quot;&gt;&lt;span face=&quot;Inter, Inter Fallback, ui-sans-serif, system-ui, apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;Kubernetes
Cluster Architecture&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;line-height: 180%; margin-bottom: 0in; orphans: 2; widows: 2;&quot;&gt;
&lt;span style=&quot;font-variant: normal;&quot;&gt;&lt;span style=&quot;color: #3f4250;&quot;&gt;&lt;span face=&quot;Inter, Inter Fallback, ui-sans-serif, system-ui, apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-style: normal;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;For
more information to the different Kubernetes components, refer to our
dedicated blog post:&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;em&gt;&lt;a href=&quot;https://www.scaleway.com/en/blog/an-introduction-to-kubernetes/&quot;&gt;&lt;span style=&quot;font-variant: normal;&quot;&gt;&lt;span style=&quot;color: #3f4250;&quot;&gt;&lt;span face=&quot;Inter, Inter Fallback, ui-sans-serif, system-ui, apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-style: normal;&quot;&gt;&lt;b&gt;&lt;span style=&quot;background: transparent;&quot;&gt;An
introduction to Kubernetes&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;h2 class=&quot;western&quot; style=&quot;font-style: normal; font-variant: normal; letter-spacing: normal; line-height: 180%; orphans: 2; widows: 2;&quot;&gt;&lt;a name=&quot;horizontal-vs-vertical-scaling&quot;&gt;&lt;/a&gt;
&lt;span style=&quot;color: #3f4250;&quot;&gt;&lt;span face=&quot;var font-space-grotesk&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;b&gt;Horizontal
vs. Vertical Scaling&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;table cellpadding=&quot;2&quot; cellspacing=&quot;0&quot; style=&quot;width: 786px;&quot;&gt;
	&lt;colgroup&gt;&lt;col width=&quot;91&quot;&gt;&lt;/col&gt;

	&lt;col width=&quot;197&quot;&gt;&lt;/col&gt;

	&lt;col width=&quot;486&quot;&gt;&lt;/col&gt;

	&lt;/colgroup&gt;&lt;thead&gt;
		&lt;tr&gt;
			&lt;th style=&quot;border: none; padding: 0in;&quot; width=&quot;91&quot;&gt;&lt;p style=&quot;font-weight: normal;&quot;&gt;
				Horizontal&lt;/p&gt;
			&lt;/th&gt;
			&lt;th style=&quot;border: none; padding: 0in;&quot; width=&quot;197&quot;&gt;&lt;p style=&quot;font-weight: normal;&quot;&gt;
				Vertical&lt;/p&gt;
			&lt;/th&gt;
			&lt;th style=&quot;border: none; padding: 0in;&quot; width=&quot;486&quot;&gt;&lt;/th&gt;
		&lt;/tr&gt;
	&lt;/thead&gt;
	&lt;tbody&gt;
		&lt;tr&gt;
			&lt;td style=&quot;border: none; padding: 0in;&quot; width=&quot;91&quot;&gt;&lt;p&gt;&lt;strong&gt;&lt;b&gt;Pod&lt;/b&gt;&lt;/strong&gt;&lt;/p&gt;
			&lt;/td&gt;
			&lt;td style=&quot;border: none; padding: 0in;&quot; width=&quot;197&quot;&gt;&lt;p&gt;Adds or
				removes Pods&lt;/p&gt;
			&lt;/td&gt;
			&lt;td style=&quot;border: none; padding: 0in;&quot; width=&quot;486&quot;&gt;&lt;p&gt;Modifies CPU
				and/or RAM resources allocated to the Pod&lt;/p&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
		&lt;tr&gt;
			&lt;td style=&quot;border: none; padding: 0in;&quot; width=&quot;91&quot;&gt;&lt;p&gt;&lt;strong&gt;&lt;b&gt;Node&lt;/b&gt;&lt;/strong&gt;&lt;/p&gt;
			&lt;/td&gt;
			&lt;td style=&quot;border: none; padding: 0in;&quot; width=&quot;197&quot;&gt;&lt;p&gt;Adds or
				removes Nodes&lt;/p&gt;
			&lt;/td&gt;
			&lt;td style=&quot;border: none; padding: 0in;&quot; width=&quot;486&quot;&gt;&lt;p&gt;Modifies CPU
				and/or RAM resources allocated to the Node&lt;/p&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
	&lt;/tbody&gt;
&lt;/table&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;p style=&quot;border: none; line-height: 200%; margin-bottom: 0in; orphans: 2; padding: 0in; widows: 2;&quot;&gt;
	&lt;strong&gt;&lt;span style=&quot;font-variant: normal;&quot;&gt;&lt;span style=&quot;color: #3f4250;&quot;&gt;&lt;span face=&quot;Inter, Inter Fallback, ui-sans-serif, system-ui, apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-style: normal;&quot;&gt;&lt;b&gt;Horizontal
	Scaling&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;font-variant: normal;&quot;&gt;&lt;span style=&quot;color: #3f4250;&quot;&gt;&lt;span face=&quot;Inter, Inter Fallback, ui-sans-serif, system-ui, apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-style: normal;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;means
	modifying the compute resources of an existing cluster, for example,
	by adding new nodes to it or by adding new pods by increasing the
	replica count of pods (Horizontal Pod Autoscaler).&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
	&lt;/li&gt;&lt;li&gt;&lt;p style=&quot;border: none; line-height: 200%; orphans: 2; padding: 0in; widows: 2;&quot;&gt;
	&lt;strong&gt;&lt;span style=&quot;font-variant: normal;&quot;&gt;&lt;span style=&quot;color: #3f4250;&quot;&gt;&lt;span face=&quot;Inter, Inter Fallback, ui-sans-serif, system-ui, apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-style: normal;&quot;&gt;&lt;b&gt;Vertical
	Scaling&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;font-variant: normal;&quot;&gt;&lt;span style=&quot;color: #3f4250;&quot;&gt;&lt;span face=&quot;Inter, Inter Fallback, ui-sans-serif, system-ui, apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-style: normal;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;means
	to modify the attributed resources (like CPU or RAM) of each node in
	the cluster. In most cases, this means creating an entirely new node
	pool using machines that have different hardware configurations.
	Vertical scaling on pods means dynamically adjusting the resource
	requests and limits based on the current application requirements
	(Vertical Pod Autoscaler).&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/li&gt;&lt;/ul&gt;
&lt;h3 class=&quot;western&quot; style=&quot;font-style: normal; font-variant: normal; letter-spacing: normal; line-height: 200%; orphans: 2; widows: 2;&quot;&gt;&lt;a name=&quot;horizontal-pod-autoscaler&quot;&gt;&lt;/a&gt;
&lt;span style=&quot;color: #3f4250;&quot;&gt;&lt;span face=&quot;var font-space-grotesk&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;b&gt;Horizontal
Pod Autoscaler&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p style=&quot;line-height: 180%; margin-bottom: 0in; orphans: 2; widows: 2;&quot;&gt;
&lt;span style=&quot;font-variant: normal;&quot;&gt;&lt;span style=&quot;color: #3f4250;&quot;&gt;&lt;span face=&quot;Inter, Inter Fallback, ui-sans-serif, system-ui, apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-style: normal;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;The&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;a href=&quot;https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/&quot;&gt;&lt;span style=&quot;font-variant: normal;&quot;&gt;&lt;span style=&quot;color: #3f4250;&quot;&gt;&lt;span face=&quot;Inter, Inter Fallback, ui-sans-serif, system-ui, apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-style: normal;&quot;&gt;&lt;b&gt;&lt;span style=&quot;background: transparent;&quot;&gt;Horizontal
Pod Autoscaler (HPA)&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;font-variant: normal;&quot;&gt;&lt;span style=&quot;color: #3f4250;&quot;&gt;&lt;span face=&quot;Inter, Inter Fallback, ui-sans-serif, system-ui, apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-style: normal;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;is
able to scale the number of pods available in a cluster to handle the
current computational workload requirements of an application. It
determines the number of pods needed based on metrics set by you and
applies the creation or deletion of pods based on threshold sets. In
most cases, these metrics are CPU and RAM usage, but it is also
possible to specify your custom metrics. The HPA checks continuously
the CPU and memory metrics generated by the&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;border: none; display: inline-block; padding: 0in;&quot;&gt;&lt;span style=&quot;font-variant: normal;&quot;&gt;&lt;span style=&quot;color: #f4516d;&quot;&gt;&lt;span style=&quot;font-family: monospace, monospace;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-style: normal;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;background: rgb(240, 243, 247);&quot;&gt;&lt;code class=&quot;western&quot;&gt;metrics-server&lt;/code&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-variant: normal;&quot;&gt;&lt;span style=&quot;color: #3f4250;&quot;&gt;&lt;span face=&quot;Inter, Inter Fallback, ui-sans-serif, system-ui, apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-style: normal;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;installed
in the Kubernetes cluster.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 180%; margin-bottom: 0in; orphans: 2; widows: 2;&quot;&gt;
&lt;span style=&quot;color: #3f4250;&quot;&gt;&lt;span face=&quot;Inter, Inter Fallback, ui-sans-serif, system-ui, apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;If
one of the specified thresholds is met, it updates the number of pod
replicas inside the deployment controller. Following the updated
number of pod replicas, the deployment controller will scale up or
down the number of pods until the number of replicas matches the
desired number. In case you want to use custom metrics to define
rules on how the HPA handles scaling your pods, your cluster needs to
be linked to a time-series database holding the metrics you want to
use. Please note that Horizontal Pod Autoscaling can not be applied
to objects that can not be scaled like, for example, DaemonSets.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3 class=&quot;western&quot; style=&quot;font-style: normal; font-variant: normal; letter-spacing: normal; line-height: 200%; orphans: 2; widows: 2;&quot;&gt;&lt;a name=&quot;vertical-pod-autoscaler&quot;&gt;&lt;/a&gt;
&lt;span style=&quot;color: #3f4250;&quot;&gt;&lt;span face=&quot;var font-space-grotesk&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;b&gt;Vertical
Pod Autoscaler&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p style=&quot;line-height: 180%; margin-bottom: 0in; orphans: 2; widows: 2;&quot;&gt;
&lt;span style=&quot;font-variant: normal;&quot;&gt;&lt;span style=&quot;color: #3f4250;&quot;&gt;&lt;span face=&quot;Inter, Inter Fallback, ui-sans-serif, system-ui, apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-style: normal;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;The&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;a href=&quot;https://github.com/kubernetes/autoscaler/blob/master/vertical-pod-autoscaler/README.md&quot;&gt;&lt;span style=&quot;font-variant: normal;&quot;&gt;&lt;span style=&quot;color: #3f4250;&quot;&gt;&lt;span face=&quot;Inter, Inter Fallback, ui-sans-serif, system-ui, apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-style: normal;&quot;&gt;&lt;b&gt;&lt;span style=&quot;background: transparent;&quot;&gt;Vertical
Pod Autoscaler (VPA)&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;font-variant: normal;&quot;&gt;&lt;span style=&quot;color: #3f4250;&quot;&gt;&lt;span face=&quot;Inter, Inter Fallback, ui-sans-serif, system-ui, apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-style: normal;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;can
allocate more (or less) CPU and memory resources to existing pods to
modify the available compute resources for an application. This
feature can be useful to monitor and adjust the allocated resources
of each pod over its lifetime. The VPA comes with a tool called&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;em&gt;&lt;span style=&quot;font-variant: normal;&quot;&gt;&lt;span style=&quot;color: #3f4250;&quot;&gt;&lt;span face=&quot;Inter, Inter Fallback, ui-sans-serif, system-ui, apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-style: normal;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;VPA
Recommender&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/em&gt;&lt;span style=&quot;font-variant: normal;&quot;&gt;&lt;span style=&quot;color: #3f4250;&quot;&gt;&lt;span face=&quot;Inter, Inter Fallback, ui-sans-serif, system-ui, apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-style: normal;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;,
which monitors the current and past resource consumption and use this
data to provide recommended CPU and memory resources to be allocated
for the containers. The Vertical Pod Autoscaler does not update
resource configurations for existing pods. It checks which pods have
the correct resource configuration and kills the ones that are not
having the recommended configuration so that their controllers can
recreate them with the updated configuration.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 180%; margin-bottom: 0in; orphans: 2; widows: 2;&quot;&gt;
&lt;span style=&quot;color: #3f4250;&quot;&gt;&lt;span face=&quot;Inter, Inter Fallback, ui-sans-serif, system-ui, apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;When
you want to use the HPA and VPA both at the same time to manage your
container resources, you may put them in a conflict which each other
when using the same metrics (CPU and memory). Both of them will try
to solve the situation simultaneously, resulting in a wrong
allocation of resources. However, it is possible to use them both if
they rely on different metrics. The VPA uses CPU and memory
consumption as unique sources to gather the perfect resource
allocation, but the HPA can be used with custom metrics so both tools
can be used in parallel.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3 class=&quot;western&quot; style=&quot;font-style: normal; font-variant: normal; letter-spacing: normal; line-height: 200%; orphans: 2; widows: 2;&quot;&gt;&lt;a name=&quot;kubernetes-nodes-autoscaler&quot;&gt;&lt;/a&gt;
&lt;span style=&quot;color: #3f4250;&quot;&gt;&lt;span face=&quot;var font-space-grotesk&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;b&gt;Kubernetes
Nodes Autoscaler&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p style=&quot;line-height: 180%; margin-bottom: 0in; orphans: 2; widows: 2;&quot;&gt;
&lt;span style=&quot;font-variant: normal;&quot;&gt;&lt;span style=&quot;color: #3f4250;&quot;&gt;&lt;span face=&quot;Inter, Inter Fallback, ui-sans-serif, system-ui, apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-style: normal;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;The
Kubernetes Nodes Autoscaler adds or removes nodes in a cluster based
on&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;strong&gt;&lt;span style=&quot;font-variant: normal;&quot;&gt;&lt;span style=&quot;color: #3f4250;&quot;&gt;&lt;span face=&quot;var font-inter&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-style: normal;&quot;&gt;&lt;b&gt;all
pods&#39; requested resources&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;font-variant: normal;&quot;&gt;&lt;span style=&quot;color: #3f4250;&quot;&gt;&lt;span face=&quot;Inter, Inter Fallback, ui-sans-serif, system-ui, apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-style: normal;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;.
It is possible to define a minimum and a maximum number of nodes
available to the cluster from the&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;a href=&quot;https://console.scaleway.com/register&quot;&gt;&lt;span style=&quot;font-variant: normal;&quot;&gt;&lt;span style=&quot;color: #3f4250;&quot;&gt;&lt;span face=&quot;Inter, Inter Fallback, ui-sans-serif, system-ui, apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-style: normal;&quot;&gt;&lt;b&gt;&lt;span style=&quot;background: transparent;&quot;&gt;Scaleway
Elements console&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;font-variant: normal;&quot;&gt;&lt;span style=&quot;color: #3f4250;&quot;&gt;&lt;span face=&quot;Inter, Inter Fallback, ui-sans-serif, system-ui, apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-style: normal;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 180%; margin-bottom: 0in; orphans: 2; widows: 2;&quot;&gt;
&lt;span style=&quot;color: #3f4250;&quot;&gt;&lt;span face=&quot;Inter, Inter Fallback, ui-sans-serif, system-ui, apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;While
the Horizontal and Vertical Pod Autoscalers allow you to scale pods,
the Kubernetes Node Autoscaler scales your clusters nodes, based on
the number of pending pods. The CA checks to see whether there are
any pending pods and increases the cluster&#39;s size so that these pods
can be created. It also deallocates idle nodes to keep the cluster at
the optimal size. The Nodes Autoscaler can request to deploy new
nodes directly in your pool, within the given resource limits (if
any).&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;line-height: 180%; margin-bottom: 0in; orphans: 2; widows: 2;&quot;&gt;
&lt;strong&gt;&lt;span style=&quot;font-variant: normal;&quot;&gt;&lt;span style=&quot;color: #3f4250;&quot;&gt;&lt;span face=&quot;var font-inter&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-style: normal;&quot;&gt;&lt;b&gt;Cluster
upscaling&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;font-variant: normal;&quot;&gt;&lt;span style=&quot;color: #3f4250;&quot;&gt;&lt;span face=&quot;Inter, Inter Fallback, ui-sans-serif, system-ui, apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-style: normal;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;br /&gt;
If
pods are scheduled for execution, the Kubernetes Autoscaler can
increase the number of machines in the cluster to avoid resource
shortage. The diagram below illustrates how a cluster can be
automatically upscaled:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; widows: 2;&quot;&gt;
&lt;span class=&quot;sd-abs-pos&quot; style=&quot;left: 0in; position: absolute; width: 778px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #3f4250;&quot;&gt;&lt;span face=&quot;Inter, Inter Fallback, ui-sans-serif, system-ui, apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;Kubernetes
Nodes Autoscaler upscaling&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 180%; margin-bottom: 0in; orphans: 2; widows: 2;&quot;&gt;
&lt;span style=&quot;color: #3f4250;&quot;&gt;&lt;span face=&quot;Inter, Inter Fallback, ui-sans-serif, system-ui, apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;As
illustrated, two pods are scheduled for execution but the current
node&#39;s compute capacity is reached. The cluster autoscaler
automatically scans all nodes for scheduled pods. It requests
provision of a new node if three conditions are met:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;p style=&quot;border: none; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 200%; margin-bottom: 0in; orphans: 2; padding: 0in; widows: 2;&quot;&gt;
	&lt;span style=&quot;color: #3f4250;&quot;&gt;&lt;span face=&quot;Inter, Inter Fallback, ui-sans-serif, system-ui, apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;Some
	pods failed to schedule on any of the existing nodes due to
	insufficient available resources.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
	&lt;/li&gt;&lt;li&gt;&lt;p style=&quot;border: none; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 200%; margin-bottom: 0in; orphans: 2; padding: 0in; widows: 2;&quot;&gt;
	&lt;span style=&quot;color: #3f4250;&quot;&gt;&lt;span face=&quot;Inter, Inter Fallback, ui-sans-serif, system-ui, apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;Adding
	a node with the same specifications as the current ones help to
	redistribute the load.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
	&lt;/li&gt;&lt;li&gt;&lt;p style=&quot;border: none; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 200%; orphans: 2; padding: 0in; widows: 2;&quot;&gt;
	&lt;span style=&quot;color: #3f4250;&quot;&gt;&lt;span face=&quot;Inter, Inter Fallback, ui-sans-serif, system-ui, apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;The
	cluster has not reached the user-defined maximum node count.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/li&gt;&lt;/ul&gt;
&lt;p style=&quot;font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 180%; margin-bottom: 0in; orphans: 2; widows: 2;&quot;&gt;
&lt;span style=&quot;color: #3f4250;&quot;&gt;&lt;span face=&quot;Inter, Inter Fallback, ui-sans-serif, system-ui, apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;Once
the node is deployed and detected by the Kubernetes Control Plane,
the scheduler allocates the pending pods to the cluster&#39;s new node.
In case there are still some pending pods, the autoscaler repeats
these steps as often as required.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;line-height: 180%; margin-bottom: 0in; orphans: 2; widows: 2;&quot;&gt;
&lt;strong&gt;&lt;span style=&quot;font-variant: normal;&quot;&gt;&lt;span style=&quot;color: #3f4250;&quot;&gt;&lt;span face=&quot;var font-inter&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-style: normal;&quot;&gt;&lt;b&gt;Cluster
downscaling&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;font-variant: normal;&quot;&gt;&lt;span style=&quot;color: #3f4250;&quot;&gt;&lt;span face=&quot;Inter, Inter Fallback, ui-sans-serif, system-ui, apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-style: normal;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;br /&gt;
The
Kubernetes Cluster Autoscaler decreases the number of nodes in a
cluster when some are considered not necessary for a pre-defined
amount of time. To be considered unnecessary, a node must have low
utilization, and all of its important pods can be moved elsewhere
without resource shortage. The node scaledown check takes into
account the resource requests made by the pods, and if the Kubernetes
scheduler decides that the pods can be moved somewhere else, it
removes the node from the cluster to optimize resource usage and to
reduce costs. If you have defined a minimum number of active nodes in
the cluster, the autoscaler will not reduce the number of nodes below
this threshold.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h2 class=&quot;western&quot; style=&quot;font-style: normal; font-variant: normal; letter-spacing: normal; line-height: 180%; orphans: 2; widows: 2;&quot;&gt;&lt;a name=&quot;configuring-autoscaling&quot;&gt;&lt;/a&gt;
&lt;span style=&quot;color: #3f4250;&quot;&gt;&lt;span face=&quot;var font-space-grotesk&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;b&gt;Configuring
Autoscaling&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;p style=&quot;line-height: 180%; margin-bottom: 0in; orphans: 2; widows: 2;&quot;&gt;
&lt;span style=&quot;font-variant: normal;&quot;&gt;&lt;span style=&quot;color: #3f4250;&quot;&gt;&lt;span face=&quot;Inter, Inter Fallback, ui-sans-serif, system-ui, apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-style: normal;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;You
can configure&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;strong&gt;&lt;span style=&quot;font-variant: normal;&quot;&gt;&lt;span style=&quot;color: #3f4250;&quot;&gt;&lt;span face=&quot;var font-inter&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-style: normal;&quot;&gt;&lt;b&gt;Cluster
Autoscaling&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;font-variant: normal;&quot;&gt;&lt;span style=&quot;color: #3f4250;&quot;&gt;&lt;span face=&quot;Inter, Inter Fallback, ui-sans-serif, system-ui, apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-style: normal;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;directly
from your&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;a href=&quot;https://console.scaleway.com/&quot;&gt;&lt;span style=&quot;font-variant: normal;&quot;&gt;&lt;span style=&quot;color: #3f4250;&quot;&gt;&lt;span face=&quot;Inter, Inter Fallback, ui-sans-serif, system-ui, apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-style: normal;&quot;&gt;&lt;b&gt;&lt;span style=&quot;background: transparent;&quot;&gt;Scaleway
Elements&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;font-variant: normal;&quot;&gt;&lt;span style=&quot;color: #3f4250;&quot;&gt;&lt;span face=&quot;Inter, Inter Fallback, ui-sans-serif, system-ui, apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-style: normal;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;console.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;line-height: 180%; margin-bottom: 0in; orphans: 2; widows: 2;&quot;&gt;
&lt;strong&gt;&lt;span style=&quot;font-variant: normal;&quot;&gt;&lt;span style=&quot;color: #3f4250;&quot;&gt;&lt;span face=&quot;var font-inter&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-style: normal;&quot;&gt;&lt;b&gt;During
Cluster creation:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;font-variant: normal;&quot;&gt;&lt;span style=&quot;color: #3f4250;&quot;&gt;&lt;span face=&quot;Inter, Inter Fallback, ui-sans-serif, system-ui, apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-style: normal;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;br /&gt;
To
enable Kubernetes Cluster Autoscaling during the creation of a new
cluster, head to step 5 in the cluster creation form, toggle the
switch, and set the minimum and maximum resources available for your
cluster:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;line-height: 180%; margin-bottom: 0in; orphans: 2; widows: 2;&quot;&gt;
&lt;strong&gt;&lt;span style=&quot;font-variant: normal;&quot;&gt;&lt;span style=&quot;color: #3f4250;&quot;&gt;&lt;span face=&quot;var font-inter&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-style: normal;&quot;&gt;&lt;b&gt;On
an existing Cluster:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;&lt;p style=&quot;line-height: 200%; margin-bottom: 0in; orphans: 2; widows: 2;&quot;&gt;
	&lt;span style=&quot;font-variant: normal;&quot;&gt;&lt;span style=&quot;color: #3f4250;&quot;&gt;&lt;span face=&quot;Inter, Inter Fallback, ui-sans-serif, system-ui, apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-style: normal;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;From
	your cluster information page, click on the&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;strong&gt;&lt;span style=&quot;font-variant: normal;&quot;&gt;&lt;span style=&quot;color: #3f4250;&quot;&gt;&lt;span face=&quot;Inter, Inter Fallback, ui-sans-serif, system-ui, apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-style: normal;&quot;&gt;&lt;b&gt;Pools&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;font-variant: normal;&quot;&gt;&lt;span style=&quot;color: #3f4250;&quot;&gt;&lt;span face=&quot;Inter, Inter Fallback, ui-sans-serif, system-ui, apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-style: normal;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;tab
	and select the pool to modify. Click&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;strong&gt;&lt;span style=&quot;font-variant: normal;&quot;&gt;&lt;span style=&quot;color: #3f4250;&quot;&gt;&lt;span face=&quot;Inter, Inter Fallback, ui-sans-serif, system-ui, apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-style: normal;&quot;&gt;&lt;b&gt;Edit&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;font-variant: normal;&quot;&gt;&lt;span style=&quot;color: #3f4250;&quot;&gt;&lt;span face=&quot;Inter, Inter Fallback, ui-sans-serif, system-ui, apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-style: normal;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;in
	the pools drop-down menu to configure the pool:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
	&lt;/li&gt;&lt;li&gt;&lt;p style=&quot;line-height: 200%; orphans: 2; widows: 2;&quot;&gt;&lt;span style=&quot;font-variant: normal;&quot;&gt;&lt;span style=&quot;color: #3f4250;&quot;&gt;&lt;span face=&quot;Inter, Inter Fallback, ui-sans-serif, system-ui, apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-style: normal;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;Toggle
	on the&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;strong&gt;&lt;span style=&quot;font-variant: normal;&quot;&gt;&lt;span style=&quot;color: #3f4250;&quot;&gt;&lt;span face=&quot;Inter, Inter Fallback, ui-sans-serif, system-ui, apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-style: normal;&quot;&gt;&lt;b&gt;Autoscale
	the number of nodes&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;font-variant: normal;&quot;&gt;&lt;span style=&quot;color: #3f4250;&quot;&gt;&lt;span face=&quot;Inter, Inter Fallback, ui-sans-serif, system-ui, apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-style: normal;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;switch
	and set the desired number of minimum and maximum resources
	available for the pool:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/li&gt;&lt;/ol&gt;
&lt;ol start=&quot;3&quot;&gt;
	&lt;li&gt;&lt;p style=&quot;line-height: 200%; orphans: 2; widows: 2;&quot;&gt;&lt;span style=&quot;font-variant: normal;&quot;&gt;&lt;span style=&quot;color: #3f4250;&quot;&gt;&lt;span face=&quot;Inter, Inter Fallback, ui-sans-serif, system-ui, apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-style: normal;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;Confirm
	the the modification of the pool by clicking on&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;strong&gt;&lt;span style=&quot;font-variant: normal;&quot;&gt;&lt;span style=&quot;color: #3f4250;&quot;&gt;&lt;span face=&quot;Inter, Inter Fallback, ui-sans-serif, system-ui, apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-style: normal;&quot;&gt;&lt;b&gt;Update
	pool.&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;/li&gt;&lt;/ol&gt;
&lt;h2 class=&quot;western&quot; style=&quot;font-style: normal; font-variant: normal; letter-spacing: normal; line-height: 180%; orphans: 2; widows: 2;&quot;&gt;&lt;a name=&quot;conclusion&quot;&gt;&lt;/a&gt;
&lt;span style=&quot;color: #3f4250;&quot;&gt;&lt;span face=&quot;var font-space-grotesk&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;b&gt;Conclusion&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;p style=&quot;font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 180%; margin-bottom: 0in; orphans: 2; widows: 2;&quot;&gt;
&lt;span style=&quot;color: #3f4250;&quot;&gt;&lt;span face=&quot;Inter, Inter Fallback, ui-sans-serif, system-ui, apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;You
now understand the basics of Kubernetes Autoscaling features and how
you can use them to configure your cluster for maximum performances.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;line-height: 180%; margin-bottom: 0in; orphans: 2; widows: 2;&quot;&gt;
&lt;span style=&quot;font-variant: normal;&quot;&gt;&lt;span style=&quot;color: #3f4250;&quot;&gt;&lt;span face=&quot;Inter, Inter Fallback, ui-sans-serif, system-ui, apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-style: normal;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;For
more information about the Kubernetes Cluster Autoscaler,
please&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;a href=&quot;https://github.com/kubernetes/autoscaler/blob/cad686ebf3f2/cluster-autoscaler/FAQ.md&quot;&gt;&lt;span style=&quot;font-variant: normal;&quot;&gt;&lt;span style=&quot;color: #3f4250;&quot;&gt;&lt;span face=&quot;Inter, Inter Fallback, ui-sans-serif, system-ui, apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-style: normal;&quot;&gt;&lt;b&gt;&lt;span style=&quot;background: transparent;&quot;&gt;refer
to the official documentation&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;font-variant: normal;&quot;&gt;&lt;span style=&quot;color: #3f4250;&quot;&gt;&lt;span face=&quot;Inter, Inter Fallback, ui-sans-serif, system-ui, apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-style: normal;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;line-height: 180%; margin-bottom: 0in; orphans: 2; widows: 2;&quot;&gt;
&lt;span style=&quot;font-variant: normal;&quot;&gt;&lt;span style=&quot;color: #3f4250;&quot;&gt;&lt;span face=&quot;Inter, Inter Fallback, ui-sans-serif, system-ui, apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-style: normal;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;You
can also deploy your first&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;a href=&quot;https://console.scaleway.com/kapsule/clusters&quot;&gt;&lt;span style=&quot;font-variant: normal;&quot;&gt;&lt;span style=&quot;color: #3f4250;&quot;&gt;&lt;span face=&quot;Inter, Inter Fallback, ui-sans-serif, system-ui, apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-style: normal;&quot;&gt;&lt;b&gt;&lt;span style=&quot;background: transparent;&quot;&gt;Kubernetes
Kapsule Cluster&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;font-variant: normal;&quot;&gt;&lt;span style=&quot;color: #3f4250;&quot;&gt;&lt;span face=&quot;Inter, Inter Fallback, ui-sans-serif, system-ui, apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-style: normal;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;directly
from your Scaleway console and try out the Autoscaling feature
yourself!&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;line-height: 0.43in; margin-bottom: 0.27in; orphans: 2; widows: 2;&quot;&gt;
&lt;br /&gt;
&lt;br /&gt;

&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://mehmetyoldas.blogspot.com/feeds/7816191802423726802/comments/default' title='Kayıt Yorumları'/><link rel='replies' type='text/html' href='http://mehmetyoldas.blogspot.com/2025/03/understanding-kubernetes-autoscaling.html#comment-form' title='0 Yorum'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5628326400009361051/posts/default/7816191802423726802'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5628326400009361051/posts/default/7816191802423726802'/><link rel='alternate' type='text/html' href='http://mehmetyoldas.blogspot.com/2025/03/understanding-kubernetes-autoscaling.html' title='Understanding Kubernetes Autoscaling'/><author><name>Mehmet Yoldaş</name><uri>http://www.blogger.com/profile/17372934623166164299</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVw6x10V3awMwQJFzrhYEEvr-YMR-YcaKARcY29nS8Ny67irGfpUKqZ4uvXuwn6LQhPqNtJq5NQ4rkOE0x29vlgd4UNHA9D6B3uo8_D6VU7-5TZyDRRW-W6MAgLjn7DA/s220/profil+Ba%C5%9Fak+Foto%C4%9Fraf%C3%A7%C4%B1l%C4%B1k.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5628326400009361051.post-2303867915315543278</id><published>2025-03-04T01:34:00.002+03:00</published><updated>2025-03-04T01:34:06.783+03:00</updated><title type='text'>Auto-Scaling in Kubernetes: A Step-by-Step Guide</title><content type='html'>&lt;p&gt;&lt;/p&gt;&lt;h1 class=&quot;western&quot; style=&quot;font-variant: normal; letter-spacing: normal; line-height: 0.43in; margin-bottom: 0.27in; margin-top: 0in; orphans: 2; widows: 2;&quot;&gt;&lt;span style=&quot;color: #242424; font-family: source-serif-pro, Georgia, Cambria, &amp;quot;Times New Roman&amp;quot;, Times, serif; font-size: 12pt; font-weight: normal;&quot;&gt;Kubernetes
is a powerful container orchestration tool that simplifies the
deployment, scaling, and management of containerized applications.
One of the key features of Kubernetes is its ability to automatically
scale applications based on demand. This guide will walk you through
the process of setting up auto-scaling in Kubernetes using the
Horizontal Pod Autoscaler (HPA).&lt;/span&gt;&lt;/h1&gt;
&lt;h1 class=&quot;western&quot; style=&quot;font-style: normal; font-variant: normal; font-weight: normal; line-height: 0.25in; orphans: 2; widows: 2;&quot;&gt;&lt;a name=&quot;a877&quot;&gt;&lt;/a&gt;
&lt;span style=&quot;color: #242424;&quot;&gt;&lt;span style=&quot;font-family: sohne, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;Prerequisites&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h1&gt;
&lt;p style=&quot;font-style: normal; font-variant: normal; font-weight: normal; line-height: 0.27in; orphans: 2; widows: 2;&quot;&gt;&lt;a name=&quot;913f&quot;&gt;&lt;/a&gt;
&lt;span style=&quot;color: #242424;&quot;&gt;&lt;span style=&quot;font-family: source-serif-pro, Georgia, Cambria, Times New Roman, Times, serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Before
we dive in, make sure you have the following:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;p style=&quot;border: none; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 0.27in; margin-bottom: 0in; orphans: 2; padding: 0in; widows: 2;&quot;&gt;&lt;a name=&quot;8788&quot;&gt;&lt;/a&gt;
	&lt;span style=&quot;color: #242424;&quot;&gt;&lt;span style=&quot;font-family: source-serif-pro, Georgia, Cambria, Times New Roman, Times, serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;A
	Kubernetes cluster (you can use Minikube for local development).&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
	&lt;/li&gt;&lt;li&gt;&lt;p style=&quot;border: none; line-height: 0.27in; margin-bottom: 0in; orphans: 2; padding: 0in; widows: 2;&quot;&gt;&lt;a name=&quot;9f1c&quot;&gt;&lt;/a&gt;
	&lt;span style=&quot;border: none; display: inline-block; padding: 0in;&quot;&gt;&lt;span style=&quot;font-variant: normal;&quot;&gt;&lt;span style=&quot;color: #242424;&quot;&gt;&lt;span style=&quot;font-family: source-code-pro, Menlo, Monaco, Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-style: normal;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;background: #f2f2f2;&quot;&gt;&lt;code class=&quot;western&quot;&gt;kubectl&lt;/code&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-variant: normal;&quot;&gt;&lt;span style=&quot;color: #242424;&quot;&gt;&lt;span style=&quot;font-family: source-serif-pro, Georgia, Cambria, Times New Roman, Times, serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-style: normal;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;installed
	and configured to communicate with your cluster.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
	&lt;/li&gt;&lt;li&gt;&lt;p style=&quot;border: none; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 0.27in; margin-bottom: 0in; orphans: 2; padding: 0in; widows: 2;&quot;&gt;&lt;a name=&quot;dbf1&quot;&gt;&lt;/a&gt;
	&lt;span style=&quot;color: #242424;&quot;&gt;&lt;span style=&quot;font-family: source-serif-pro, Georgia, Cambria, Times New Roman, Times, serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;The
	Metrics Server installed on your cluster.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/li&gt;&lt;/ul&gt;
&lt;h1 class=&quot;western&quot; style=&quot;font-style: normal; font-variant: normal; font-weight: normal; line-height: 0.25in; orphans: 2; widows: 2;&quot;&gt;&lt;a name=&quot;3752&quot;&gt;&lt;/a&gt;
&lt;span style=&quot;color: #242424;&quot;&gt;&lt;span style=&quot;font-family: sohne, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;Step
1: Setting Up the Environment&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h1&gt;
&lt;ol&gt;
	&lt;li&gt;&lt;p style=&quot;border: none; line-height: 0.27in; margin-bottom: 0in; orphans: 2; padding: 0in; widows: 2;&quot;&gt;&lt;a name=&quot;68df&quot;&gt;&lt;/a&gt;
	&lt;strong&gt;&lt;span style=&quot;font-variant: normal;&quot;&gt;&lt;span style=&quot;color: #242424;&quot;&gt;&lt;span style=&quot;font-family: source-serif-pro, Georgia, Cambria, Times New Roman, Times, serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-style: normal;&quot;&gt;&lt;b&gt;Install
	Minikube and kubectl:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
	&lt;/li&gt;&lt;li&gt;&lt;p style=&quot;border: none; line-height: 0.27in; margin-bottom: 0in; orphans: 2; padding: 0in; widows: 2;&quot;&gt;&lt;a name=&quot;68ce&quot;&gt;&lt;/a&gt;
	&lt;strong&gt;&lt;span style=&quot;font-variant: normal;&quot;&gt;&lt;span style=&quot;color: #242424;&quot;&gt;&lt;span style=&quot;font-family: source-serif-pro, Georgia, Cambria, Times New Roman, Times, serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-style: normal;&quot;&gt;&lt;b&gt;Start
	Minikube: [&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;font-variant: normal;&quot;&gt;&lt;span style=&quot;color: #242424;&quot;&gt;&lt;span style=&quot;font-family: source-serif-pro, Georgia, Cambria, Times New Roman, Times, serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-style: normal;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;minikube
	start&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;strong&gt;&lt;span style=&quot;font-variant: normal;&quot;&gt;&lt;span style=&quot;color: #242424;&quot;&gt;&lt;span style=&quot;font-family: source-serif-pro, Georgia, Cambria, Times New Roman, Times, serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-style: normal;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style=&quot;font-variant: normal;&quot;&gt;&lt;span style=&quot;color: #242424;&quot;&gt;&lt;span style=&quot;font-family: source-serif-pro, Georgia, Cambria, Times New Roman, Times, serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-style: normal;&quot;&gt;&lt;b&gt;]&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;/li&gt;&lt;/ol&gt;
&lt;h1 class=&quot;western&quot; style=&quot;font-style: normal; font-variant: normal; font-weight: normal; line-height: 0.25in; orphans: 2; widows: 2;&quot;&gt;&lt;a name=&quot;d080&quot;&gt;&lt;/a&gt;
&lt;span style=&quot;color: #242424;&quot;&gt;&lt;span style=&quot;font-family: sohne, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;Step
2: Install Metrics Server&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h1&gt;
&lt;p style=&quot;font-style: normal; font-variant: normal; font-weight: normal; line-height: 0.27in; orphans: 2; widows: 2;&quot;&gt;&lt;a name=&quot;d9bb&quot;&gt;&lt;/a&gt;
&lt;span style=&quot;color: #242424;&quot;&gt;&lt;span style=&quot;font-family: source-serif-pro, Georgia, Cambria, Times New Roman, Times, serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;The
Metrics Server is essential for HPA as it provides the resource usage
metrics.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;line-height: 0.27in; orphans: 2; widows: 2;&quot;&gt;&lt;a name=&quot;445b&quot;&gt;&lt;/a&gt;
&lt;strong&gt;&lt;span style=&quot;font-variant: normal;&quot;&gt;&lt;span style=&quot;color: #242424;&quot;&gt;&lt;span style=&quot;font-family: source-serif-pro, Georgia, Cambria, Times New Roman, Times, serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-style: normal;&quot;&gt;&lt;b&gt;Deploy
the Metrics Server:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;pre class=&quot;western&quot; style=&quot;background: #f9f9f9; border: 1px solid #e5e5e5; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 140%; margin-top: 0.47in; orphans: 2; padding: 0.27in; widows: 2;&quot;&gt;&lt;a name=&quot;5f5e&quot;&gt;&lt;/a&gt;&lt;span style=&quot;color: #242424;&quot;&gt;&lt;span style=&quot;font-family: source-code-pro, Menlo, Monaco, Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;font-size: xx-small;&quot;&gt;kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/latest/download/components.yaml&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;p style=&quot;line-height: 0.27in; orphans: 2; widows: 2;&quot;&gt;
&lt;a name=&quot;4c0c&quot;&gt;&lt;/a&gt;&lt;strong&gt;&lt;span style=&quot;font-variant: normal;&quot;&gt;&lt;span style=&quot;color: #242424;&quot;&gt;&lt;span style=&quot;font-family: source-serif-pro, Georgia, Cambria, Times New Roman, Times, serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-style: normal;&quot;&gt;&lt;b&gt;Verify
Metrics Server Installation:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;pre class=&quot;western&quot; style=&quot;background: #f9f9f9; border: 1px solid #e5e5e5; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 140%; margin-top: 0.47in; orphans: 2; padding: 0.27in; widows: 2;&quot;&gt;&lt;a name=&quot;2207&quot;&gt;&lt;/a&gt;&lt;span style=&quot;color: #242424;&quot;&gt;&lt;span style=&quot;font-family: source-code-pro, Menlo, Monaco, Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;font-size: xx-small;&quot;&gt;kubectl &lt;span style=&quot;color: #aa0d91;&quot;&gt;get&lt;/span&gt; deployment metrics-server -n kube-&lt;span style=&quot;color: #aa0d91;&quot;&gt;system&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;h1 class=&quot;western&quot; style=&quot;font-style: normal; font-variant: normal; font-weight: normal; line-height: 0.25in; orphans: 2; widows: 2;&quot;&gt;
&lt;a name=&quot;efe5&quot;&gt;&lt;/a&gt;&lt;span style=&quot;color: #242424;&quot;&gt;&lt;span style=&quot;font-family: sohne, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;Step
3: Deploy a Sample Application&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h1&gt;
&lt;p style=&quot;font-style: normal; font-variant: normal; font-weight: normal; line-height: 0.27in; orphans: 2; widows: 2;&quot;&gt;&lt;a name=&quot;9c94&quot;&gt;&lt;/a&gt;
&lt;span style=&quot;color: #242424;&quot;&gt;&lt;span style=&quot;font-family: source-serif-pro, Georgia, Cambria, Times New Roman, Times, serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;We’ll
use a simple Nginx deployment as our sample application.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;line-height: 0.27in; orphans: 2; widows: 2;&quot;&gt;&lt;a name=&quot;3ee5&quot;&gt;&lt;/a&gt;
&lt;strong&gt;&lt;span style=&quot;font-variant: normal;&quot;&gt;&lt;span style=&quot;color: #242424;&quot;&gt;&lt;span style=&quot;font-family: source-serif-pro, Georgia, Cambria, Times New Roman, Times, serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-style: normal;&quot;&gt;&lt;b&gt;Create
an Nginx Deployment:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;pre class=&quot;western&quot; style=&quot;background: #f9f9f9; border: 1px solid #e5e5e5; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 140%; margin-top: 0.47in; orphans: 2; padding: 0.27in; widows: 2;&quot;&gt;&lt;a name=&quot;4643&quot;&gt;&lt;/a&gt;&lt;span style=&quot;color: #242424;&quot;&gt;&lt;span style=&quot;font-family: source-code-pro, Menlo, Monaco, Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;font-size: xx-small;&quot;&gt;kubectl &lt;span style=&quot;color: #5c2699;&quot;&gt;create&lt;/span&gt; deployment nginx &lt;span style=&quot;color: #007400;&quot;&gt;--image=nginx&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;p style=&quot;line-height: 0.27in; orphans: 2; widows: 2;&quot;&gt;
&lt;a name=&quot;7f3d&quot;&gt;&lt;/a&gt;&lt;strong&gt;&lt;span style=&quot;font-variant: normal;&quot;&gt;&lt;span style=&quot;color: #242424;&quot;&gt;&lt;span style=&quot;font-family: source-serif-pro, Georgia, Cambria, Times New Roman, Times, serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-style: normal;&quot;&gt;&lt;b&gt;Expose
the Deployment:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;pre class=&quot;western&quot; style=&quot;background: #f9f9f9; border: 1px solid #e5e5e5; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 140%; margin-top: 0.47in; orphans: 2; padding: 0.27in; widows: 2;&quot;&gt;&lt;a name=&quot;fa9b&quot;&gt;&lt;/a&gt;&lt;span style=&quot;color: #242424;&quot;&gt;&lt;span style=&quot;font-family: source-code-pro, Menlo, Monaco, Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;font-size: xx-small;&quot;&gt;kubectl expose deployment nginx --port=80 --&lt;span style=&quot;color: #5c2699;&quot;&gt;type&lt;/span&gt;=NodePort&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;p style=&quot;line-height: 0.27in; orphans: 2; widows: 2;&quot;&gt;
&lt;a name=&quot;0e5d&quot;&gt;&lt;/a&gt;&lt;strong&gt;&lt;span style=&quot;font-variant: normal;&quot;&gt;&lt;span style=&quot;color: #242424;&quot;&gt;&lt;span style=&quot;font-family: source-serif-pro, Georgia, Cambria, Times New Roman, Times, serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-style: normal;&quot;&gt;&lt;b&gt;Verify
the Deployment:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;pre class=&quot;western&quot; style=&quot;background: #f9f9f9; border: 1px solid #e5e5e5; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 140%; margin-top: 0.47in; orphans: 2; padding: 0.27in; widows: 2;&quot;&gt;&lt;a name=&quot;4313&quot;&gt;&lt;/a&gt;&lt;span style=&quot;color: #242424;&quot;&gt;&lt;span style=&quot;font-family: source-code-pro, Menlo, Monaco, Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;font-size: xx-small;&quot;&gt;kubectl &lt;span style=&quot;color: #aa0d91;&quot;&gt;get&lt;/span&gt; pods&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;h1 class=&quot;western&quot; style=&quot;line-height: 0.25in; orphans: 2; widows: 2;&quot;&gt;
&lt;a name=&quot;d2c9&quot;&gt;&lt;/a&gt;&lt;strong&gt;&lt;span style=&quot;font-variant: normal;&quot;&gt;&lt;span style=&quot;color: #242424;&quot;&gt;&lt;span style=&quot;font-family: sohne, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;font-style: normal;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;Step
4: Create a Horizontal Pod Autoscaler (HPA)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/h1&gt;
&lt;p style=&quot;font-style: normal; font-variant: normal; font-weight: normal; line-height: 0.27in; orphans: 2; widows: 2;&quot;&gt;&lt;a name=&quot;db31&quot;&gt;&lt;/a&gt;
&lt;span style=&quot;color: #242424;&quot;&gt;&lt;span style=&quot;font-family: source-serif-pro, Georgia, Cambria, Times New Roman, Times, serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Now,
we will create an HPA that scales the Nginx deployment based on CPU
utilization.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;line-height: 0.27in; orphans: 2; widows: 2;&quot;&gt;&lt;a name=&quot;fbb8&quot;&gt;&lt;/a&gt;
&lt;strong&gt;&lt;span style=&quot;font-variant: normal;&quot;&gt;&lt;span style=&quot;color: #242424;&quot;&gt;&lt;span style=&quot;font-family: source-serif-pro, Georgia, Cambria, Times New Roman, Times, serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-style: normal;&quot;&gt;&lt;b&gt;Create
the HPA:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;pre class=&quot;western&quot; style=&quot;background: #f9f9f9; border: 1px solid #e5e5e5; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 140%; margin-top: 0.47in; orphans: 2; padding: 0.27in; widows: 2;&quot;&gt;&lt;a name=&quot;7485&quot;&gt;&lt;/a&gt;&lt;span style=&quot;color: #242424;&quot;&gt;&lt;span style=&quot;font-family: source-code-pro, Menlo, Monaco, Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;font-size: xx-small;&quot;&gt;kubectl autoscale deployment nginx --cpu-percent=&lt;span style=&quot;color: #1c00cf;&quot;&gt;50&lt;/span&gt; --&lt;span style=&quot;color: #5c2699;&quot;&gt;min&lt;/span&gt;=&lt;span style=&quot;color: #1c00cf;&quot;&gt;1&lt;/span&gt; --&lt;span style=&quot;color: #5c2699;&quot;&gt;max&lt;/span&gt;=&lt;span style=&quot;color: #1c00cf;&quot;&gt;10&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;p style=&quot;line-height: 0.27in; orphans: 2; widows: 2;&quot;&gt;
&lt;a name=&quot;39e6&quot;&gt;&lt;/a&gt;&lt;strong&gt;&lt;span style=&quot;font-variant: normal;&quot;&gt;&lt;span style=&quot;color: #242424;&quot;&gt;&lt;span style=&quot;font-family: source-serif-pro, Georgia, Cambria, Times New Roman, Times, serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-style: normal;&quot;&gt;&lt;b&gt;Verify
the HPA:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;pre class=&quot;western&quot; style=&quot;background: #f9f9f9; border: 1px solid #e5e5e5; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 140%; margin-top: 0.47in; orphans: 2; padding: 0.27in; widows: 2;&quot;&gt;&lt;a name=&quot;0df2&quot;&gt;&lt;/a&gt;&lt;span style=&quot;color: #242424;&quot;&gt;&lt;span style=&quot;font-family: source-code-pro, Menlo, Monaco, Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;font-size: xx-small;&quot;&gt;kubectl &lt;span style=&quot;color: #aa0d91;&quot;&gt;get&lt;/span&gt; hpa&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;p style=&quot;line-height: 0.27in; orphans: 2; widows: 2;&quot;&gt;
&lt;a name=&quot;4796&quot;&gt;&lt;/a&gt;&lt;strong&gt;&lt;span style=&quot;font-variant: normal;&quot;&gt;&lt;span style=&quot;color: #242424;&quot;&gt;&lt;span style=&quot;font-family: source-serif-pro, Georgia, Cambria, Times New Roman, Times, serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-style: normal;&quot;&gt;&lt;b&gt;You
should see output similar to this:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;pre class=&quot;western&quot; style=&quot;background: #f9f9f9; border: 1px solid #e5e5e5; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 140%; margin-top: 0.47in; orphans: 2; padding: 0.27in; widows: 2;&quot;&gt;&lt;a name=&quot;5ace&quot;&gt;&lt;/a&gt;&lt;span style=&quot;color: #242424;&quot;&gt;&lt;span style=&quot;font-family: source-code-pro, Menlo, Monaco, Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;font-size: xx-small;&quot;&gt;NAME    REFERENCE          TARGETS    MINPODS   MAXPODS     REPLICAS       AGE&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: #242424;&quot;&gt;&lt;span style=&quot;font-family: source-code-pro, Menlo, Monaco, Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;font-size: xx-small;&quot;&gt;nginx   Deployment/nginx   &amp;lt;unknown&amp;gt;/50%   1          10        1          1m&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;p style=&quot;line-height: 0.27in; orphans: 2; widows: 2;&quot;&gt;
&lt;a name=&quot;ede7&quot;&gt;&lt;/a&gt;&lt;strong&gt;&lt;span style=&quot;font-variant: normal;&quot;&gt;&lt;span style=&quot;color: #242424;&quot;&gt;&lt;span style=&quot;font-family: source-serif-pro, Georgia, Cambria, Times New Roman, Times, serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-style: normal;&quot;&gt;&lt;b&gt;Step
5: Generate Load to Test Auto-Scaling&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p style=&quot;font-style: normal; font-variant: normal; font-weight: normal; line-height: 0.27in; orphans: 2; widows: 2;&quot;&gt;&lt;a name=&quot;9591&quot;&gt;&lt;/a&gt;
&lt;span style=&quot;color: #242424;&quot;&gt;&lt;span style=&quot;font-family: source-serif-pro, Georgia, Cambria, Times New Roman, Times, serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;To
observe auto-scaling in action, we need to generate some load on the
Nginx application.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;line-height: 0.27in; orphans: 2; widows: 2;&quot;&gt;&lt;a name=&quot;776a&quot;&gt;&lt;/a&gt;
&lt;strong&gt;&lt;span style=&quot;font-variant: normal;&quot;&gt;&lt;span style=&quot;color: #242424;&quot;&gt;&lt;span style=&quot;font-family: source-serif-pro, Georgia, Cambria, Times New Roman, Times, serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-style: normal;&quot;&gt;&lt;b&gt;Run
a Load Generator:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p style=&quot;font-style: normal; font-variant: normal; font-weight: normal; line-height: 0.27in; orphans: 2; widows: 2;&quot;&gt;&lt;a name=&quot;2517&quot;&gt;&lt;/a&gt;
&lt;span style=&quot;color: #242424;&quot;&gt;&lt;span style=&quot;font-family: source-serif-pro, Georgia, Cambria, Times New Roman, Times, serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;We’ll
create a temporary pod that continuously sends requests to the Nginx
service.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;pre class=&quot;western&quot; style=&quot;background: #f9f9f9; border: 1px solid #e5e5e5; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 140%; margin-top: 0.47in; orphans: 2; padding: 0.27in; widows: 2;&quot;&gt;&lt;a name=&quot;e73e&quot;&gt;&lt;/a&gt;&lt;span style=&quot;color: #242424;&quot;&gt;&lt;span style=&quot;font-family: source-code-pro, Menlo, Monaco, Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;font-size: xx-small;&quot;&gt;kubectl run -i --&lt;span style=&quot;color: #5c2699;&quot;&gt;tty&lt;/span&gt; load-generator --image=busybox /bin/sh&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: #007400;&quot;&gt;&lt;span style=&quot;font-family: source-code-pro, Menlo, Monaco, Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;font-size: xx-small;&quot;&gt;# Inside the busybox shell&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: #242424;&quot;&gt;&lt;span style=&quot;font-family: source-code-pro, Menlo, Monaco, Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;font-size: xx-small;&quot;&gt;&lt;span style=&quot;color: #aa0d91;&quot;&gt;while&lt;/span&gt; &lt;span style=&quot;color: #aa0d91;&quot;&gt;true&lt;/span&gt;; &lt;span style=&quot;color: #aa0d91;&quot;&gt;do&lt;/span&gt; wget -q -O- http://nginx.default.svc.cluster.local; &lt;span style=&quot;color: #aa0d91;&quot;&gt;done&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;p style=&quot;font-style: normal; font-variant: normal; font-weight: normal; line-height: 0.27in; orphans: 2; widows: 2;&quot;&gt;
&lt;a name=&quot;e71b&quot;&gt;&lt;/a&gt;&lt;span style=&quot;color: #242424;&quot;&gt;&lt;span style=&quot;font-family: source-serif-pro, Georgia, Cambria, Times New Roman, Times, serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;This
command will create a load on the Nginx service by continuously
making HTTP requests.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;line-height: 0.27in; orphans: 2; widows: 2;&quot;&gt;&lt;a name=&quot;9072&quot;&gt;&lt;/a&gt;
&lt;strong&gt;&lt;span style=&quot;font-variant: normal;&quot;&gt;&lt;span style=&quot;color: #242424;&quot;&gt;&lt;span style=&quot;font-family: source-serif-pro, Georgia, Cambria, Times New Roman, Times, serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-style: normal;&quot;&gt;&lt;b&gt;Observe
Auto-Scaling:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p style=&quot;font-style: normal; font-variant: normal; font-weight: normal; line-height: 0.27in; orphans: 2; widows: 2;&quot;&gt;&lt;a name=&quot;2775&quot;&gt;&lt;/a&gt;
&lt;span style=&quot;color: #242424;&quot;&gt;&lt;span style=&quot;font-family: source-serif-pro, Georgia, Cambria, Times New Roman, Times, serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;After
a few minutes, the HPA should detect the increased CPU load and start
scaling the number of Nginx pods. You can monitor this by running:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;pre class=&quot;western&quot; style=&quot;background: #f9f9f9; border: 1px solid #e5e5e5; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 140%; margin-top: 0.47in; orphans: 2; padding: 0.27in; widows: 2;&quot;&gt;&lt;a name=&quot;48a3&quot;&gt;&lt;/a&gt;&lt;span style=&quot;color: #242424;&quot;&gt;&lt;span style=&quot;font-family: source-code-pro, Menlo, Monaco, Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;font-size: xx-small;&quot;&gt;kubectl &lt;span style=&quot;color: #aa0d91;&quot;&gt;get&lt;/span&gt; hpa&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: #242424;&quot;&gt;&lt;span style=&quot;font-family: source-code-pro, Menlo, Monaco, Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;font-size: xx-small;&quot;&gt;kubectl &lt;span style=&quot;color: #aa0d91;&quot;&gt;get&lt;/span&gt; pods    &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;p style=&quot;font-style: normal; font-variant: normal; font-weight: normal; line-height: 0.27in; orphans: 2; widows: 2;&quot;&gt;
&lt;a name=&quot;964e&quot;&gt;&lt;/a&gt;&lt;span style=&quot;color: #242424;&quot;&gt;&lt;span style=&quot;font-family: source-serif-pro, Georgia, Cambria, Times New Roman, Times, serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;You
should see the number of Nginx pods increase based on the load.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h1 class=&quot;western&quot; style=&quot;line-height: 0.25in; orphans: 2; widows: 2;&quot;&gt;&lt;a name=&quot;79f8&quot;&gt;&lt;/a&gt;
&lt;strong&gt;&lt;span style=&quot;font-variant: normal;&quot;&gt;&lt;span style=&quot;color: #242424;&quot;&gt;&lt;span style=&quot;font-family: sohne, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;font-style: normal;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;Step
6: Clean Up&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/h1&gt;
&lt;p style=&quot;font-style: normal; font-variant: normal; font-weight: normal; line-height: 0.27in; orphans: 2; widows: 2;&quot;&gt;&lt;a name=&quot;b5ee&quot;&gt;&lt;/a&gt;
&lt;span style=&quot;color: #242424;&quot;&gt;&lt;span style=&quot;font-family: source-serif-pro, Georgia, Cambria, Times New Roman, Times, serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Once
you are done testing, you can clean up the resources to avoid
unnecessary costs and resource usage.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;line-height: 0.27in; orphans: 2; widows: 2;&quot;&gt;&lt;a name=&quot;1452&quot;&gt;&lt;/a&gt;
&lt;strong&gt;&lt;span style=&quot;font-variant: normal;&quot;&gt;&lt;span style=&quot;color: #242424;&quot;&gt;&lt;span style=&quot;font-family: source-serif-pro, Georgia, Cambria, Times New Roman, Times, serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-style: normal;&quot;&gt;&lt;b&gt;Delete
the Nginx Deployment and Service:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;pre class=&quot;western&quot; style=&quot;background: #f9f9f9; border: 1px solid #e5e5e5; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 140%; margin-top: 0.47in; orphans: 2; padding: 0.27in; widows: 2;&quot;&gt;&lt;a name=&quot;eab6&quot;&gt;&lt;/a&gt;&lt;span style=&quot;color: #242424;&quot;&gt;&lt;span style=&quot;font-family: source-code-pro, Menlo, Monaco, Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;font-size: xx-small;&quot;&gt;kubectl &lt;span style=&quot;color: #aa0d91;&quot;&gt;delete&lt;/span&gt; deployment nginx&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: #242424;&quot;&gt;&lt;span style=&quot;font-family: source-code-pro, Menlo, Monaco, Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;font-size: xx-small;&quot;&gt;kubectl &lt;span style=&quot;color: #aa0d91;&quot;&gt;delete&lt;/span&gt; svc nginx&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;p style=&quot;line-height: 0.27in; orphans: 2; widows: 2;&quot;&gt;
&lt;a name=&quot;7f63&quot;&gt;&lt;/a&gt;&lt;strong&gt;&lt;span style=&quot;font-variant: normal;&quot;&gt;&lt;span style=&quot;color: #242424;&quot;&gt;&lt;span style=&quot;font-family: source-serif-pro, Georgia, Cambria, Times New Roman, Times, serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-style: normal;&quot;&gt;&lt;b&gt;Delete
the HPA:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;pre class=&quot;western&quot; style=&quot;background: #f9f9f9; border: 1px solid #e5e5e5; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 140%; margin-top: 0.47in; orphans: 2; padding: 0.27in; widows: 2;&quot;&gt;&lt;a name=&quot;68e0&quot;&gt;&lt;/a&gt;&lt;span style=&quot;color: #242424;&quot;&gt;&lt;span style=&quot;font-family: source-code-pro, Menlo, Monaco, Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;font-size: xx-small;&quot;&gt;kubectl &lt;span style=&quot;color: #aa0d91;&quot;&gt;delete&lt;/span&gt; hpa nginx&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;p style=&quot;line-height: 0.27in; orphans: 2; widows: 2;&quot;&gt;
&lt;a name=&quot;9037&quot;&gt;&lt;/a&gt;&lt;strong&gt;&lt;span style=&quot;font-variant: normal;&quot;&gt;&lt;span style=&quot;color: #242424;&quot;&gt;&lt;span style=&quot;font-family: source-serif-pro, Georgia, Cambria, Times New Roman, Times, serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-style: normal;&quot;&gt;&lt;b&gt;Delete
the Load Generator Pod:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;pre class=&quot;western&quot; style=&quot;background: #f9f9f9; border: 1px solid #e5e5e5; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 140%; margin-top: 0.47in; orphans: 2; padding: 0.27in; widows: 2;&quot;&gt;&lt;a name=&quot;9e19&quot;&gt;&lt;/a&gt;&lt;span style=&quot;color: #242424;&quot;&gt;&lt;span style=&quot;font-family: source-code-pro, Menlo, Monaco, Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;font-size: xx-small;&quot;&gt;kubectl &lt;span style=&quot;color: #aa0d91;&quot;&gt;delete&lt;/span&gt; pod load-generator&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;h1 class=&quot;western&quot; style=&quot;font-style: normal; font-variant: normal; font-weight: normal; line-height: 0.25in; orphans: 2; widows: 2;&quot;&gt;
&lt;a name=&quot;a736&quot;&gt;&lt;/a&gt;&lt;span style=&quot;color: #242424;&quot;&gt;&lt;span style=&quot;font-family: sohne, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;Conclusion&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h1&gt;
&lt;p style=&quot;font-style: normal; font-variant: normal; font-weight: normal; line-height: 0.27in; orphans: 2; widows: 2;&quot;&gt;&lt;a name=&quot;ef70&quot;&gt;&lt;/a&gt;
&lt;span style=&quot;color: #242424;&quot;&gt;&lt;span style=&quot;font-family: source-serif-pro, Georgia, Cambria, Times New Roman, Times, serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Auto-scaling
in Kubernetes is a powerful feature that helps ensure your
applications can handle varying levels of traffic efficiently. By
following this guide, you should be able to set up and test
auto-scaling for your applications using the Horizontal Pod
Autoscaler. Additionally, you can explore advanced auto-scaling
configurations using custom metrics and the Vertical Pod Autoscaler
for more dynamic resource management.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;line-height: 100%; margin-bottom: 0in;&quot;&gt;&lt;br /&gt;

&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://mehmetyoldas.blogspot.com/feeds/2303867915315543278/comments/default' title='Kayıt Yorumları'/><link rel='replies' type='text/html' href='http://mehmetyoldas.blogspot.com/2025/03/auto-scaling-in-kubernetes-step-by-step.html#comment-form' title='0 Yorum'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5628326400009361051/posts/default/2303867915315543278'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5628326400009361051/posts/default/2303867915315543278'/><link rel='alternate' type='text/html' href='http://mehmetyoldas.blogspot.com/2025/03/auto-scaling-in-kubernetes-step-by-step.html' title='Auto-Scaling in Kubernetes: A Step-by-Step Guide'/><author><name>Mehmet Yoldaş</name><uri>http://www.blogger.com/profile/17372934623166164299</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVw6x10V3awMwQJFzrhYEEvr-YMR-YcaKARcY29nS8Ny67irGfpUKqZ4uvXuwn6LQhPqNtJq5NQ4rkOE0x29vlgd4UNHA9D6B3uo8_D6VU7-5TZyDRRW-W6MAgLjn7DA/s220/profil+Ba%C5%9Fak+Foto%C4%9Fraf%C3%A7%C4%B1l%C4%B1k.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5628326400009361051.post-6377301215768429283</id><published>2025-03-02T14:54:00.004+03:00</published><updated>2025-03-02T14:54:40.191+03:00</updated><title type='text'>Ocelot Detaylı Anlatım</title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;strong data-end=&quot;10&quot; data-start=&quot;0&quot;&gt;Ocelot&lt;/strong&gt;, .NET ekosisteminde kullanılan popüler bir &lt;strong data-end=&quot;69&quot; data-start=&quot;54&quot;&gt;API Gateway&lt;/strong&gt; çözümüdür ve mikroservislerin yönetilmesini kolaylaştırır. &lt;strong data-end=&quot;174&quot; data-start=&quot;129&quot;&gt;Reverse Proxy (Ters Proxy) gibi çalışarak&lt;/strong&gt; gelen HTTP isteklerini yönlendirme, yük dengeleme, kimlik doğrulama, yetkilendirme, rate limiting gibi işlemleri yapar.&lt;/p&gt;&lt;p data-end=&quot;386&quot; data-start=&quot;298&quot;&gt;Şimdi &lt;strong data-end=&quot;357&quot; data-start=&quot;304&quot;&gt;Ocelot’un API Gateway yönlendirmesi nasıl çalışır&lt;/strong&gt; adım adım detaylandıralım.&lt;/p&gt;&lt;hr data-end=&quot;391&quot; data-start=&quot;388&quot; /&gt;&lt;h2 data-end=&quot;427&quot; data-start=&quot;393&quot;&gt;&lt;strong data-end=&quot;425&quot; data-start=&quot;396&quot;&gt;1. Ocelot’un Temel Yapısı&lt;/strong&gt;&lt;/h2&gt;&lt;p data-end=&quot;582&quot; data-start=&quot;428&quot;&gt;Ocelot, yönlendirme işlemlerini &lt;strong data-end=&quot;508&quot; data-start=&quot;460&quot;&gt;&lt;code data-end=&quot;475&quot; data-start=&quot;462&quot;&gt;ocelot.json&lt;/code&gt; adlı bir konfigürasyon dosyası&lt;/strong&gt; üzerinden yapar. &lt;strong data-end=&quot;580&quot; data-start=&quot;526&quot;&gt;İstekleri alır ve ilgili mikroservise yönlendirir.&lt;/strong&gt;&lt;/p&gt;&lt;p data-end=&quot;601&quot; data-start=&quot;584&quot;&gt;&lt;strong data-end=&quot;599&quot; data-start=&quot;584&quot;&gt;Temel Yapı:&lt;/strong&gt;&lt;/p&gt;&lt;ul data-end=&quot;758&quot; data-start=&quot;602&quot;&gt;&lt;li data-end=&quot;665&quot; data-start=&quot;602&quot;&gt;&lt;strong data-end=&quot;614&quot; data-start=&quot;604&quot;&gt;Client&lt;/strong&gt; → &lt;strong data-end=&quot;641&quot; data-start=&quot;617&quot;&gt;API Gateway (Ocelot)&lt;/strong&gt; → &lt;strong data-end=&quot;663&quot; data-start=&quot;644&quot;&gt;Mikro Servisler&lt;/strong&gt;&lt;/li&gt;&lt;li data-end=&quot;758&quot; data-start=&quot;666&quot;&gt;API Gateway, gelen isteği inceler ve &lt;strong data-end=&quot;756&quot; data-start=&quot;705&quot;&gt;konfigürasyon dosyasına göre yönlendirme yapar.&lt;/strong&gt;&lt;/li&gt;&lt;/ul&gt;&lt;hr data-end=&quot;763&quot; data-start=&quot;760&quot; /&gt;&lt;h2 data-end=&quot;824&quot; data-start=&quot;765&quot;&gt;&lt;strong data-end=&quot;822&quot; data-start=&quot;768&quot;&gt;2. Ocelot Konfigürasyonu ile Yönlendirme (Routing)&lt;/strong&gt;&lt;/h2&gt;&lt;p data-end=&quot;860&quot; data-start=&quot;826&quot;&gt;Bir örnek üzerinden inceleyelim:&lt;/p&gt;&lt;h3 data-end=&quot;878&quot; data-start=&quot;862&quot;&gt;&lt;strong data-end=&quot;878&quot; data-start=&quot;866&quot;&gt;Senaryo:&lt;/strong&gt;&lt;/h3&gt;&lt;ul data-end=&quot;1041&quot; data-start=&quot;879&quot;&gt;&lt;li data-end=&quot;948&quot; data-start=&quot;879&quot;&gt;&lt;strong data-end=&quot;912&quot; data-start=&quot;881&quot;&gt;Kullanıcı API’yi çağırıyor:&lt;/strong&gt; &lt;code data-end=&quot;946&quot; data-start=&quot;913&quot;&gt;https://api.example.com/users/1&lt;/code&gt;&lt;/li&gt;&lt;li data-end=&quot;1041&quot; data-start=&quot;949&quot;&gt;&lt;strong data-end=&quot;1005&quot; data-start=&quot;951&quot;&gt;Ocelot, isteği ilgili mikro servise yönlendiriyor:&lt;/strong&gt; &lt;code data-end=&quot;1039&quot; data-start=&quot;1006&quot;&gt;http://user-service/api/users/1&lt;/code&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p data-end=&quot;1083&quot; data-start=&quot;1043&quot;&gt;Bunu Ocelot’ta nasıl konfigüre ederiz?&lt;/p&gt;&lt;h3 data-end=&quot;1139&quot; data-start=&quot;1085&quot;&gt;&lt;strong data-end=&quot;1104&quot; data-start=&quot;1089&quot;&gt;ocelot.json&lt;/strong&gt; dosyasında yönlendirme ayarları:&lt;/h3&gt;&lt;pre class=&quot;!overflow-visible&quot; data-end=&quot;1474&quot; data-start=&quot;1141&quot;&gt;&lt;div class=&quot;contain-inline-size rounded-md border-[0.5px] border-token-border-medium relative bg-token-sidebar-surface-primary dark:bg-gray-950&quot;&gt;&lt;div class=&quot;flex items-center text-token-text-secondary px-4 py-2 text-xs font-sans justify-between rounded-t-[5px] h-9 bg-token-sidebar-surface-primary dark:bg-token-main-surface-secondary select-none&quot;&gt;json&lt;/div&gt;&lt;div class=&quot;sticky top-9 md:top-[5.75rem]&quot;&gt;&lt;div class=&quot;absolute bottom-0 right-2 flex h-9 items-center&quot;&gt;&lt;div class=&quot;flex items-center rounded bg-token-sidebar-surface-primary px-2 font-sans text-xs text-token-text-secondary dark:bg-token-main-surface-secondary&quot;&gt;&lt;span class=&quot;&quot; data-state=&quot;closed&quot;&gt;&lt;button aria-label=&quot;Kopyala&quot; class=&quot;flex gap-1 items-center select-none px-4 py-1&quot;&gt;&lt;svg class=&quot;icon-xs&quot; fill=&quot;none&quot; height=&quot;24&quot; viewbox=&quot;0 0 24 24&quot; width=&quot;24&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot;&gt;&lt;path clip-rule=&quot;evenodd&quot; d=&quot;M7 5C7 3.34315 8.34315 2 10 2H19C20.6569 2 22 3.34315 22 5V14C22 15.6569 20.6569 17 19 17H17V19C17 20.6569 15.6569 22 14 22H5C3.34315 22 2 20.6569 2 19V10C2 8.34315 3.34315 7 5 7H7V5ZM9 7H14C15.6569 7 17 8.34315 17 10V15H19C19.5523 15 20 14.5523 20 14V5C20 4.44772 19.5523 4 19 4H10C9.44772 4 9 4.44772 9 5V7ZM5 9C4.44772 9 4 9.44772 4 10V19C4 19.5523 4.44772 20 5 20H14C14.5523 20 15 19.5523 15 19V10C15 9.44772 14.5523 9 14 9H5Z&quot; fill-rule=&quot;evenodd&quot; fill=&quot;currentColor&quot;&gt;&lt;/path&gt;&lt;/svg&gt;Kopyala&lt;/button&gt;&lt;/span&gt;&lt;span class=&quot;&quot; data-state=&quot;closed&quot;&gt;&lt;button class=&quot;flex select-none items-center gap-1&quot;&gt;&lt;svg class=&quot;icon-xs&quot; fill=&quot;none&quot; height=&quot;24&quot; viewbox=&quot;0 0 24 24&quot; width=&quot;24&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot;&gt;&lt;path d=&quot;M2.5 5.5C4.3 5.2 5.2 4 5.5 2.5C5.8 4 6.7 5.2 8.5 5.5C6.7 5.8 5.8 7 5.5 8.5C5.2 7 4.3 5.8 2.5 5.5Z&quot; fill=&quot;currentColor&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot; stroke=&quot;currentColor&quot;&gt;&lt;/path&gt;&lt;path d=&quot;M5.66282 16.5231L5.18413 19.3952C5.12203 19.7678 5.09098 19.9541 5.14876 20.0888C5.19933 20.2067 5.29328 20.3007 5.41118 20.3512C5.54589 20.409 5.73218 20.378 6.10476 20.3159L8.97693 19.8372C9.72813 19.712 10.1037 19.6494 10.4542 19.521C10.7652 19.407 11.0608 19.2549 11.3343 19.068C11.6425 18.8575 11.9118 18.5882 12.4503 18.0497L20 10.5C21.3807 9.11929 21.3807 6.88071 20 5.5C18.6193 4.11929 16.3807 4.11929 15 5.5L7.45026 13.0497C6.91175 13.5882 6.6425 13.8575 6.43197 14.1657C6.24513 14.4392 6.09299 14.7348 5.97903 15.0458C5.85062 15.3963 5.78802 15.7719 5.66282 16.5231Z&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot; stroke-width=&quot;2&quot; stroke=&quot;currentColor&quot;&gt;&lt;/path&gt;&lt;path d=&quot;M14.5 7L18.5 11&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot; stroke-width=&quot;2&quot; stroke=&quot;currentColor&quot;&gt;&lt;/path&gt;&lt;/svg&gt;Düzenle&lt;/button&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;overflow-y-auto p-4&quot; dir=&quot;ltr&quot;&gt;&lt;code class=&quot;!whitespace-pre language-json&quot;&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;hljs-attr&quot;&gt;&quot;Routes&quot;&lt;/span&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;hljs-punctuation&quot;&gt;[&lt;/span&gt;
    &lt;span class=&quot;hljs-punctuation&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;hljs-attr&quot;&gt;&quot;DownstreamPathTemplate&quot;&lt;/span&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;hljs-string&quot;&gt;&quot;/api/users/{id}&quot;&lt;/span&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;,&lt;/span&gt;
      &lt;span class=&quot;hljs-attr&quot;&gt;&quot;DownstreamScheme&quot;&lt;/span&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;hljs-string&quot;&gt;&quot;http&quot;&lt;/span&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;,&lt;/span&gt;
      &lt;span class=&quot;hljs-attr&quot;&gt;&quot;DownstreamHostAndPorts&quot;&lt;/span&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;hljs-punctuation&quot;&gt;[&lt;/span&gt;
        &lt;span class=&quot;hljs-punctuation&quot;&gt;{&lt;/span&gt;
          &lt;span class=&quot;hljs-attr&quot;&gt;&quot;Host&quot;&lt;/span&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;hljs-string&quot;&gt;&quot;user-service&quot;&lt;/span&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;,&lt;/span&gt;
          &lt;span class=&quot;hljs-attr&quot;&gt;&quot;Port&quot;&lt;/span&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;hljs-number&quot;&gt;5001&lt;/span&gt;
        &lt;span class=&quot;hljs-punctuation&quot;&gt;}&lt;/span&gt;
      &lt;span class=&quot;hljs-punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;,&lt;/span&gt;
      &lt;span class=&quot;hljs-attr&quot;&gt;&quot;UpstreamPathTemplate&quot;&lt;/span&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;hljs-string&quot;&gt;&quot;/users/{id}&quot;&lt;/span&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;,&lt;/span&gt;
      &lt;span class=&quot;hljs-attr&quot;&gt;&quot;UpstreamHttpMethod&quot;&lt;/span&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;hljs-punctuation&quot;&gt;[&lt;/span&gt; &lt;span class=&quot;hljs-string&quot;&gt;&quot;Get&quot;&lt;/span&gt; &lt;span class=&quot;hljs-punctuation&quot;&gt;]&lt;/span&gt;
    &lt;span class=&quot;hljs-punctuation&quot;&gt;}&lt;/span&gt;
  &lt;span class=&quot;hljs-punctuation&quot;&gt;]&lt;/span&gt;
&lt;span class=&quot;hljs-punctuation&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;h3 data-end=&quot;1510&quot; data-start=&quot;1476&quot;&gt;&lt;strong data-end=&quot;1510&quot; data-start=&quot;1480&quot;&gt;Bu Yapı Ne Anlama Geliyor?&lt;/strong&gt;&lt;/h3&gt;&lt;ul data-end=&quot;1898&quot; data-start=&quot;1511&quot;&gt;&lt;li data-end=&quot;1615&quot; data-start=&quot;1511&quot;&gt;&lt;strong data-end=&quot;1537&quot; data-start=&quot;1513&quot;&gt;UpstreamPathTemplate&lt;/strong&gt;: Kullanıcıdan gelen API isteği &lt;code data-end=&quot;1605&quot; data-start=&quot;1569&quot;&gt;https://api.example.com/users/{id}&lt;/code&gt; olacak.&lt;/li&gt;&lt;li data-end=&quot;1734&quot; data-start=&quot;1616&quot;&gt;&lt;strong data-end=&quot;1644&quot; data-start=&quot;1618&quot;&gt;DownstreamPathTemplate&lt;/strong&gt;: Ocelot bu isteği &lt;strong data-end=&quot;1708&quot; data-start=&quot;1663&quot;&gt;&lt;code data-end=&quot;1706&quot; data-start=&quot;1665&quot;&gt;http://user-service:5001/api/users/{id}&lt;/code&gt;&lt;/strong&gt; adresine yönlendirecek.&lt;/li&gt;&lt;li data-end=&quot;1816&quot; data-start=&quot;1735&quot;&gt;&lt;strong data-end=&quot;1763&quot; data-start=&quot;1737&quot;&gt;DownstreamHostAndPorts&lt;/strong&gt;: Mikroservisin bulunduğu &lt;strong data-end=&quot;1805&quot; data-start=&quot;1789&quot;&gt;host ve port&lt;/strong&gt; bilgisi.&lt;/li&gt;&lt;li data-end=&quot;1898&quot; data-start=&quot;1817&quot;&gt;&lt;strong data-end=&quot;1841&quot; data-start=&quot;1819&quot;&gt;UpstreamHttpMethod&lt;/strong&gt;: Sadece &lt;code data-end=&quot;1855&quot; data-start=&quot;1850&quot;&gt;GET&lt;/code&gt; isteklerine izin verildiğini belirtiyor.&lt;/li&gt;&lt;/ul&gt;&lt;hr data-end=&quot;1903&quot; data-start=&quot;1900&quot; /&gt;&lt;h2 data-end=&quot;1940&quot; data-start=&quot;1905&quot;&gt;&lt;strong data-end=&quot;1940&quot; data-start=&quot;1908&quot;&gt;3. Ocelot’un Çalışma Mantığı&lt;/strong&gt;&lt;/h2&gt;&lt;ol data-end=&quot;2346&quot; data-start=&quot;1941&quot;&gt;&lt;li data-end=&quot;2070&quot; data-start=&quot;1941&quot;&gt;&lt;strong data-end=&quot;2015&quot; data-start=&quot;1944&quot;&gt;Client (Örneğin bir frontend uygulaması), API Gateway’e istek atar:&lt;/strong&gt;&lt;pre class=&quot;!overflow-visible&quot; data-end=&quot;2070&quot; data-start=&quot;2021&quot;&gt;&lt;div class=&quot;contain-inline-size rounded-md border-[0.5px] border-token-border-medium relative bg-token-sidebar-surface-primary dark:bg-gray-950&quot;&gt;&lt;div class=&quot;flex items-center text-token-text-secondary px-4 py-2 text-xs font-sans justify-between rounded-t-[5px] h-9 bg-token-sidebar-surface-primary dark:bg-token-main-surface-secondary select-none&quot;&gt;nginx&lt;/div&gt;&lt;div class=&quot;sticky top-9 md:top-[5.75rem]&quot;&gt;&lt;div class=&quot;absolute bottom-0 right-2 flex h-9 items-center&quot;&gt;&lt;div class=&quot;flex items-center rounded bg-token-sidebar-surface-primary px-2 font-sans text-xs text-token-text-secondary dark:bg-token-main-surface-secondary&quot;&gt;&lt;span class=&quot;&quot; data-state=&quot;closed&quot;&gt;&lt;button aria-label=&quot;Kopyala&quot; class=&quot;flex gap-1 items-center select-none px-4 py-1&quot;&gt;&lt;svg class=&quot;icon-xs&quot; fill=&quot;none&quot; height=&quot;24&quot; viewbox=&quot;0 0 24 24&quot; width=&quot;24&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot;&gt;&lt;path clip-rule=&quot;evenodd&quot; d=&quot;M7 5C7 3.34315 8.34315 2 10 2H19C20.6569 2 22 3.34315 22 5V14C22 15.6569 20.6569 17 19 17H17V19C17 20.6569 15.6569 22 14 22H5C3.34315 22 2 20.6569 2 19V10C2 8.34315 3.34315 7 5 7H7V5ZM9 7H14C15.6569 7 17 8.34315 17 10V15H19C19.5523 15 20 14.5523 20 14V5C20 4.44772 19.5523 4 19 4H10C9.44772 4 9 4.44772 9 5V7ZM5 9C4.44772 9 4 9.44772 4 10V19C4 19.5523 4.44772 20 5 20H14C14.5523 20 15 19.5523 15 19V10C15 9.44772 14.5523 9 14 9H5Z&quot; fill-rule=&quot;evenodd&quot; fill=&quot;currentColor&quot;&gt;&lt;/path&gt;&lt;/svg&gt;Kopyala&lt;/button&gt;&lt;/span&gt;&lt;span class=&quot;&quot; data-state=&quot;closed&quot;&gt;&lt;button class=&quot;flex select-none items-center gap-1&quot;&gt;&lt;svg class=&quot;icon-xs&quot; fill=&quot;none&quot; height=&quot;24&quot; viewbox=&quot;0 0 24 24&quot; width=&quot;24&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot;&gt;&lt;path d=&quot;M2.5 5.5C4.3 5.2 5.2 4 5.5 2.5C5.8 4 6.7 5.2 8.5 5.5C6.7 5.8 5.8 7 5.5 8.5C5.2 7 4.3 5.8 2.5 5.5Z&quot; fill=&quot;currentColor&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot; stroke=&quot;currentColor&quot;&gt;&lt;/path&gt;&lt;path d=&quot;M5.66282 16.5231L5.18413 19.3952C5.12203 19.7678 5.09098 19.9541 5.14876 20.0888C5.19933 20.2067 5.29328 20.3007 5.41118 20.3512C5.54589 20.409 5.73218 20.378 6.10476 20.3159L8.97693 19.8372C9.72813 19.712 10.1037 19.6494 10.4542 19.521C10.7652 19.407 11.0608 19.2549 11.3343 19.068C11.6425 18.8575 11.9118 18.5882 12.4503 18.0497L20 10.5C21.3807 9.11929 21.3807 6.88071 20 5.5C18.6193 4.11929 16.3807 4.11929 15 5.5L7.45026 13.0497C6.91175 13.5882 6.6425 13.8575 6.43197 14.1657C6.24513 14.4392 6.09299 14.7348 5.97903 15.0458C5.85062 15.3963 5.78802 15.7719 5.66282 16.5231Z&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot; stroke-width=&quot;2&quot; stroke=&quot;currentColor&quot;&gt;&lt;/path&gt;&lt;path d=&quot;M14.5 7L18.5 11&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot; stroke-width=&quot;2&quot; stroke=&quot;currentColor&quot;&gt;&lt;/path&gt;&lt;/svg&gt;Düzenle&lt;/button&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;overflow-y-auto p-4&quot; dir=&quot;ltr&quot;&gt;&lt;code class=&quot;!whitespace-pre&quot;&gt;&lt;span class=&quot;hljs-attribute&quot;&gt;GET&lt;/span&gt; https://api.example.com/users/1
&lt;/code&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li data-end=&quot;2147&quot; data-start=&quot;2071&quot;&gt;&lt;strong data-end=&quot;2145&quot; data-start=&quot;2074&quot;&gt;Ocelot, &lt;code data-end=&quot;2097&quot; data-start=&quot;2084&quot;&gt;ocelot.json&lt;/code&gt; dosyasına bakar ve uygun yönlendirmeyi bulur.&lt;/strong&gt;&lt;/li&gt;&lt;li data-end=&quot;2270&quot; data-start=&quot;2148&quot;&gt;&lt;strong data-end=&quot;2210&quot; data-start=&quot;2151&quot;&gt;İsteği, ilgili mikro servisin endpoint’ine yönlendirir:&lt;/strong&gt;&lt;pre class=&quot;!overflow-visible&quot; data-end=&quot;2270&quot; data-start=&quot;2216&quot;&gt;&lt;div class=&quot;contain-inline-size rounded-md border-[0.5px] border-token-border-medium relative bg-token-sidebar-surface-primary dark:bg-gray-950&quot;&gt;&lt;div class=&quot;flex items-center text-token-text-secondary px-4 py-2 text-xs font-sans justify-between rounded-t-[5px] h-9 bg-token-sidebar-surface-primary dark:bg-token-main-surface-secondary select-none&quot;&gt;bash&lt;/div&gt;&lt;div class=&quot;sticky top-9 md:top-[5.75rem]&quot;&gt;&lt;div class=&quot;absolute bottom-0 right-2 flex h-9 items-center&quot;&gt;&lt;div class=&quot;flex items-center rounded bg-token-sidebar-surface-primary px-2 font-sans text-xs text-token-text-secondary dark:bg-token-main-surface-secondary&quot;&gt;&lt;span class=&quot;&quot; data-state=&quot;closed&quot;&gt;&lt;button aria-label=&quot;Kopyala&quot; class=&quot;flex gap-1 items-center select-none px-4 py-1&quot;&gt;&lt;svg class=&quot;icon-xs&quot; fill=&quot;none&quot; height=&quot;24&quot; viewbox=&quot;0 0 24 24&quot; width=&quot;24&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot;&gt;&lt;path clip-rule=&quot;evenodd&quot; d=&quot;M7 5C7 3.34315 8.34315 2 10 2H19C20.6569 2 22 3.34315 22 5V14C22 15.6569 20.6569 17 19 17H17V19C17 20.6569 15.6569 22 14 22H5C3.34315 22 2 20.6569 2 19V10C2 8.34315 3.34315 7 5 7H7V5ZM9 7H14C15.6569 7 17 8.34315 17 10V15H19C19.5523 15 20 14.5523 20 14V5C20 4.44772 19.5523 4 19 4H10C9.44772 4 9 4.44772 9 5V7ZM5 9C4.44772 9 4 9.44772 4 10V19C4 19.5523 4.44772 20 5 20H14C14.5523 20 15 19.5523 15 19V10C15 9.44772 14.5523 9 14 9H5Z&quot; fill-rule=&quot;evenodd&quot; fill=&quot;currentColor&quot;&gt;&lt;/path&gt;&lt;/svg&gt;Kopyala&lt;/button&gt;&lt;/span&gt;&lt;span class=&quot;&quot; data-state=&quot;closed&quot;&gt;&lt;button class=&quot;flex select-none items-center gap-1&quot;&gt;&lt;svg class=&quot;icon-xs&quot; fill=&quot;none&quot; height=&quot;24&quot; viewbox=&quot;0 0 24 24&quot; width=&quot;24&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot;&gt;&lt;path d=&quot;M2.5 5.5C4.3 5.2 5.2 4 5.5 2.5C5.8 4 6.7 5.2 8.5 5.5C6.7 5.8 5.8 7 5.5 8.5C5.2 7 4.3 5.8 2.5 5.5Z&quot; fill=&quot;currentColor&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot; stroke=&quot;currentColor&quot;&gt;&lt;/path&gt;&lt;path d=&quot;M5.66282 16.5231L5.18413 19.3952C5.12203 19.7678 5.09098 19.9541 5.14876 20.0888C5.19933 20.2067 5.29328 20.3007 5.41118 20.3512C5.54589 20.409 5.73218 20.378 6.10476 20.3159L8.97693 19.8372C9.72813 19.712 10.1037 19.6494 10.4542 19.521C10.7652 19.407 11.0608 19.2549 11.3343 19.068C11.6425 18.8575 11.9118 18.5882 12.4503 18.0497L20 10.5C21.3807 9.11929 21.3807 6.88071 20 5.5C18.6193 4.11929 16.3807 4.11929 15 5.5L7.45026 13.0497C6.91175 13.5882 6.6425 13.8575 6.43197 14.1657C6.24513 14.4392 6.09299 14.7348 5.97903 15.0458C5.85062 15.3963 5.78802 15.7719 5.66282 16.5231Z&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot; stroke-width=&quot;2&quot; stroke=&quot;currentColor&quot;&gt;&lt;/path&gt;&lt;path d=&quot;M14.5 7L18.5 11&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot; stroke-width=&quot;2&quot; stroke=&quot;currentColor&quot;&gt;&lt;/path&gt;&lt;/svg&gt;Düzenle&lt;/button&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;overflow-y-auto p-4&quot; dir=&quot;ltr&quot;&gt;&lt;code class=&quot;!whitespace-pre&quot;&gt;GET http://user-service:5001/api/users/1
&lt;/code&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li data-end=&quot;2346&quot; data-start=&quot;2271&quot;&gt;&lt;strong data-end=&quot;2344&quot; data-start=&quot;2274&quot;&gt;Mikro servis yanıtı döner, Ocelot bu yanıtı alıp istemciye iletir.&lt;/strong&gt;&lt;/li&gt;&lt;/ol&gt;&lt;blockquote data-end=&quot;2461&quot; data-start=&quot;2348&quot;&gt;&lt;p data-end=&quot;2461&quot; data-start=&quot;2350&quot;&gt;&lt;strong data-end=&quot;2360&quot; data-start=&quot;2350&quot;&gt;Sonuç:&lt;/strong&gt; API Gateway tek giriş noktası olur, istemciler mikro servislerin iç yapısını bilmeden onlara ulaşır.&lt;/p&gt;&lt;/blockquote&gt;&lt;hr data-end=&quot;2466&quot; data-start=&quot;2463&quot; /&gt;&lt;h2 data-end=&quot;2512&quot; data-start=&quot;2468&quot;&gt;&lt;strong data-end=&quot;2510&quot; data-start=&quot;2471&quot;&gt;4. Birden Fazla Servis ile Kullanım&lt;/strong&gt;&lt;/h2&gt;&lt;p data-end=&quot;2607&quot; data-start=&quot;2514&quot;&gt;Birden fazla mikro servisi Ocelot üzerinden yönlendirmek için farklı rotalar ekleyebiliriz.&lt;/p&gt;&lt;h3 data-end=&quot;2671&quot; data-start=&quot;2609&quot;&gt;&lt;strong data-end=&quot;2671&quot; data-start=&quot;2613&quot;&gt;Örnek: Hem Kullanıcı Servisi Hem de Ürün Servisi Olsun&lt;/strong&gt;&lt;/h3&gt;&lt;pre class=&quot;!overflow-visible&quot; data-end=&quot;3227&quot; data-start=&quot;2672&quot;&gt;&lt;div class=&quot;contain-inline-size rounded-md border-[0.5px] border-token-border-medium relative bg-token-sidebar-surface-primary dark:bg-gray-950&quot;&gt;&lt;div class=&quot;flex items-center text-token-text-secondary px-4 py-2 text-xs font-sans justify-between rounded-t-[5px] h-9 bg-token-sidebar-surface-primary dark:bg-token-main-surface-secondary select-none&quot;&gt;json&lt;/div&gt;&lt;div class=&quot;sticky top-9 md:top-[5.75rem]&quot;&gt;&lt;div class=&quot;absolute bottom-0 right-2 flex h-9 items-center&quot;&gt;&lt;div class=&quot;flex items-center rounded bg-token-sidebar-surface-primary px-2 font-sans text-xs text-token-text-secondary dark:bg-token-main-surface-secondary&quot;&gt;&lt;span class=&quot;&quot; data-state=&quot;closed&quot;&gt;&lt;button aria-label=&quot;Kopyala&quot; class=&quot;flex gap-1 items-center select-none px-4 py-1&quot;&gt;&lt;svg class=&quot;icon-xs&quot; fill=&quot;none&quot; height=&quot;24&quot; viewbox=&quot;0 0 24 24&quot; width=&quot;24&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot;&gt;&lt;path clip-rule=&quot;evenodd&quot; d=&quot;M7 5C7 3.34315 8.34315 2 10 2H19C20.6569 2 22 3.34315 22 5V14C22 15.6569 20.6569 17 19 17H17V19C17 20.6569 15.6569 22 14 22H5C3.34315 22 2 20.6569 2 19V10C2 8.34315 3.34315 7 5 7H7V5ZM9 7H14C15.6569 7 17 8.34315 17 10V15H19C19.5523 15 20 14.5523 20 14V5C20 4.44772 19.5523 4 19 4H10C9.44772 4 9 4.44772 9 5V7ZM5 9C4.44772 9 4 9.44772 4 10V19C4 19.5523 4.44772 20 5 20H14C14.5523 20 15 19.5523 15 19V10C15 9.44772 14.5523 9 14 9H5Z&quot; fill-rule=&quot;evenodd&quot; fill=&quot;currentColor&quot;&gt;&lt;/path&gt;&lt;/svg&gt;Kopyala&lt;/button&gt;&lt;/span&gt;&lt;span class=&quot;&quot; data-state=&quot;closed&quot;&gt;&lt;button class=&quot;flex select-none items-center gap-1&quot;&gt;&lt;svg class=&quot;icon-xs&quot; fill=&quot;none&quot; height=&quot;24&quot; viewbox=&quot;0 0 24 24&quot; width=&quot;24&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot;&gt;&lt;path d=&quot;M2.5 5.5C4.3 5.2 5.2 4 5.5 2.5C5.8 4 6.7 5.2 8.5 5.5C6.7 5.8 5.8 7 5.5 8.5C5.2 7 4.3 5.8 2.5 5.5Z&quot; fill=&quot;currentColor&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot; stroke=&quot;currentColor&quot;&gt;&lt;/path&gt;&lt;path d=&quot;M5.66282 16.5231L5.18413 19.3952C5.12203 19.7678 5.09098 19.9541 5.14876 20.0888C5.19933 20.2067 5.29328 20.3007 5.41118 20.3512C5.54589 20.409 5.73218 20.378 6.10476 20.3159L8.97693 19.8372C9.72813 19.712 10.1037 19.6494 10.4542 19.521C10.7652 19.407 11.0608 19.2549 11.3343 19.068C11.6425 18.8575 11.9118 18.5882 12.4503 18.0497L20 10.5C21.3807 9.11929 21.3807 6.88071 20 5.5C18.6193 4.11929 16.3807 4.11929 15 5.5L7.45026 13.0497C6.91175 13.5882 6.6425 13.8575 6.43197 14.1657C6.24513 14.4392 6.09299 14.7348 5.97903 15.0458C5.85062 15.3963 5.78802 15.7719 5.66282 16.5231Z&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot; stroke-width=&quot;2&quot; stroke=&quot;currentColor&quot;&gt;&lt;/path&gt;&lt;path d=&quot;M14.5 7L18.5 11&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot; stroke-width=&quot;2&quot; stroke=&quot;currentColor&quot;&gt;&lt;/path&gt;&lt;/svg&gt;Düzenle&lt;/button&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;overflow-y-auto p-4&quot; dir=&quot;ltr&quot;&gt;&lt;code class=&quot;!whitespace-pre language-json&quot;&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;hljs-attr&quot;&gt;&quot;Routes&quot;&lt;/span&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;hljs-punctuation&quot;&gt;[&lt;/span&gt;
    &lt;span class=&quot;hljs-punctuation&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;hljs-attr&quot;&gt;&quot;DownstreamPathTemplate&quot;&lt;/span&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;hljs-string&quot;&gt;&quot;/api/users/{id}&quot;&lt;/span&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;,&lt;/span&gt;
      &lt;span class=&quot;hljs-attr&quot;&gt;&quot;DownstreamScheme&quot;&lt;/span&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;hljs-string&quot;&gt;&quot;http&quot;&lt;/span&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;,&lt;/span&gt;
      &lt;span class=&quot;hljs-attr&quot;&gt;&quot;DownstreamHostAndPorts&quot;&lt;/span&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;hljs-punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;hljs-attr&quot;&gt;&quot;Host&quot;&lt;/span&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;hljs-string&quot;&gt;&quot;user-service&quot;&lt;/span&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;hljs-attr&quot;&gt;&quot;Port&quot;&lt;/span&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;hljs-number&quot;&gt;5001&lt;/span&gt; &lt;span class=&quot;hljs-punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;,&lt;/span&gt;
      &lt;span class=&quot;hljs-attr&quot;&gt;&quot;UpstreamPathTemplate&quot;&lt;/span&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;hljs-string&quot;&gt;&quot;/users/{id}&quot;&lt;/span&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;,&lt;/span&gt;
      &lt;span class=&quot;hljs-attr&quot;&gt;&quot;UpstreamHttpMethod&quot;&lt;/span&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;hljs-punctuation&quot;&gt;[&lt;/span&gt; &lt;span class=&quot;hljs-string&quot;&gt;&quot;Get&quot;&lt;/span&gt; &lt;span class=&quot;hljs-punctuation&quot;&gt;]&lt;/span&gt;
    &lt;span class=&quot;hljs-punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;hljs-punctuation&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;hljs-attr&quot;&gt;&quot;DownstreamPathTemplate&quot;&lt;/span&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;hljs-string&quot;&gt;&quot;/api/products/{id}&quot;&lt;/span&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;,&lt;/span&gt;
      &lt;span class=&quot;hljs-attr&quot;&gt;&quot;DownstreamScheme&quot;&lt;/span&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;hljs-string&quot;&gt;&quot;http&quot;&lt;/span&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;,&lt;/span&gt;
      &lt;span class=&quot;hljs-attr&quot;&gt;&quot;DownstreamHostAndPorts&quot;&lt;/span&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;hljs-punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;hljs-attr&quot;&gt;&quot;Host&quot;&lt;/span&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;hljs-string&quot;&gt;&quot;product-service&quot;&lt;/span&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;hljs-attr&quot;&gt;&quot;Port&quot;&lt;/span&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;hljs-number&quot;&gt;5002&lt;/span&gt; &lt;span class=&quot;hljs-punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;,&lt;/span&gt;
      &lt;span class=&quot;hljs-attr&quot;&gt;&quot;UpstreamPathTemplate&quot;&lt;/span&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;hljs-string&quot;&gt;&quot;/products/{id}&quot;&lt;/span&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;,&lt;/span&gt;
      &lt;span class=&quot;hljs-attr&quot;&gt;&quot;UpstreamHttpMethod&quot;&lt;/span&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;hljs-punctuation&quot;&gt;[&lt;/span&gt; &lt;span class=&quot;hljs-string&quot;&gt;&quot;Get&quot;&lt;/span&gt; &lt;span class=&quot;hljs-punctuation&quot;&gt;]&lt;/span&gt;
    &lt;span class=&quot;hljs-punctuation&quot;&gt;}&lt;/span&gt;
  &lt;span class=&quot;hljs-punctuation&quot;&gt;]&lt;/span&gt;
&lt;span class=&quot;hljs-punctuation&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;blockquote data-end=&quot;3414&quot; data-start=&quot;3229&quot;&gt;&lt;p data-end=&quot;3243&quot; data-start=&quot;3231&quot;&gt;&lt;strong data-end=&quot;3241&quot; data-start=&quot;3231&quot;&gt;Sonuç:&lt;/strong&gt;&lt;/p&gt;&lt;ul data-end=&quot;3414&quot; data-start=&quot;3246&quot;&gt;&lt;li data-end=&quot;3324&quot; data-start=&quot;3246&quot;&gt;&lt;code data-end=&quot;3281&quot; data-start=&quot;3248&quot;&gt;https://api.example.com/users/1&lt;/code&gt; → &lt;code data-end=&quot;3322&quot; data-start=&quot;3284&quot;&gt;http://user-service:5001/api/users/1&lt;/code&gt;&lt;/li&gt;&lt;li data-end=&quot;3414&quot; data-start=&quot;3327&quot;&gt;&lt;code data-end=&quot;3365&quot; data-start=&quot;3329&quot;&gt;https://api.example.com/products/2&lt;/code&gt; → &lt;code data-end=&quot;3412&quot; data-start=&quot;3368&quot;&gt;http://product-service:5002/api/products/2&lt;/code&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/blockquote&gt;&lt;hr data-end=&quot;3419&quot; data-start=&quot;3416&quot; /&gt;&lt;h2 data-end=&quot;3472&quot; data-start=&quot;3421&quot;&gt;&lt;strong data-end=&quot;3472&quot; data-start=&quot;3424&quot;&gt;5. Ocelot ile Load Balancing (Yük Dengeleme)&lt;/strong&gt;&lt;/h2&gt;&lt;p data-end=&quot;3562&quot; data-start=&quot;3473&quot;&gt;Aynı mikro servisten birden fazla instance çalıştırıldığında yük dengeleme yapılabilir.&lt;/p&gt;&lt;p data-end=&quot;3662&quot; data-start=&quot;3564&quot;&gt;Örneğin, &lt;strong data-end=&quot;3622&quot; data-start=&quot;3573&quot;&gt;User Service’in birden fazla instance’ı varsa&lt;/strong&gt;, aşağıdaki gibi bir yapı kurabiliriz:&lt;/p&gt;&lt;pre class=&quot;!overflow-visible&quot; data-end=&quot;4074&quot; data-start=&quot;3664&quot;&gt;&lt;div class=&quot;contain-inline-size rounded-md border-[0.5px] border-token-border-medium relative bg-token-sidebar-surface-primary dark:bg-gray-950&quot;&gt;&lt;div class=&quot;flex items-center text-token-text-secondary px-4 py-2 text-xs font-sans justify-between rounded-t-[5px] h-9 bg-token-sidebar-surface-primary dark:bg-token-main-surface-secondary select-none&quot;&gt;json&lt;/div&gt;&lt;div class=&quot;sticky top-9 md:top-[5.75rem]&quot;&gt;&lt;div class=&quot;absolute bottom-0 right-2 flex h-9 items-center&quot;&gt;&lt;div class=&quot;flex items-center rounded bg-token-sidebar-surface-primary px-2 font-sans text-xs text-token-text-secondary dark:bg-token-main-surface-secondary&quot;&gt;&lt;span class=&quot;&quot; data-state=&quot;closed&quot;&gt;&lt;button aria-label=&quot;Kopyala&quot; class=&quot;flex gap-1 items-center select-none px-4 py-1&quot;&gt;&lt;svg class=&quot;icon-xs&quot; fill=&quot;none&quot; height=&quot;24&quot; viewbox=&quot;0 0 24 24&quot; width=&quot;24&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot;&gt;&lt;path clip-rule=&quot;evenodd&quot; d=&quot;M7 5C7 3.34315 8.34315 2 10 2H19C20.6569 2 22 3.34315 22 5V14C22 15.6569 20.6569 17 19 17H17V19C17 20.6569 15.6569 22 14 22H5C3.34315 22 2 20.6569 2 19V10C2 8.34315 3.34315 7 5 7H7V5ZM9 7H14C15.6569 7 17 8.34315 17 10V15H19C19.5523 15 20 14.5523 20 14V5C20 4.44772 19.5523 4 19 4H10C9.44772 4 9 4.44772 9 5V7ZM5 9C4.44772 9 4 9.44772 4 10V19C4 19.5523 4.44772 20 5 20H14C14.5523 20 15 19.5523 15 19V10C15 9.44772 14.5523 9 14 9H5Z&quot; fill-rule=&quot;evenodd&quot; fill=&quot;currentColor&quot;&gt;&lt;/path&gt;&lt;/svg&gt;Kopyala&lt;/button&gt;&lt;/span&gt;&lt;span class=&quot;&quot; data-state=&quot;closed&quot;&gt;&lt;button class=&quot;flex select-none items-center gap-1&quot;&gt;&lt;svg class=&quot;icon-xs&quot; fill=&quot;none&quot; height=&quot;24&quot; viewbox=&quot;0 0 24 24&quot; width=&quot;24&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot;&gt;&lt;path d=&quot;M2.5 5.5C4.3 5.2 5.2 4 5.5 2.5C5.8 4 6.7 5.2 8.5 5.5C6.7 5.8 5.8 7 5.5 8.5C5.2 7 4.3 5.8 2.5 5.5Z&quot; fill=&quot;currentColor&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot; stroke=&quot;currentColor&quot;&gt;&lt;/path&gt;&lt;path d=&quot;M5.66282 16.5231L5.18413 19.3952C5.12203 19.7678 5.09098 19.9541 5.14876 20.0888C5.19933 20.2067 5.29328 20.3007 5.41118 20.3512C5.54589 20.409 5.73218 20.378 6.10476 20.3159L8.97693 19.8372C9.72813 19.712 10.1037 19.6494 10.4542 19.521C10.7652 19.407 11.0608 19.2549 11.3343 19.068C11.6425 18.8575 11.9118 18.5882 12.4503 18.0497L20 10.5C21.3807 9.11929 21.3807 6.88071 20 5.5C18.6193 4.11929 16.3807 4.11929 15 5.5L7.45026 13.0497C6.91175 13.5882 6.6425 13.8575 6.43197 14.1657C6.24513 14.4392 6.09299 14.7348 5.97903 15.0458C5.85062 15.3963 5.78802 15.7719 5.66282 16.5231Z&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot; stroke-width=&quot;2&quot; stroke=&quot;currentColor&quot;&gt;&lt;/path&gt;&lt;path d=&quot;M14.5 7L18.5 11&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot; stroke-width=&quot;2&quot; stroke=&quot;currentColor&quot;&gt;&lt;/path&gt;&lt;/svg&gt;Düzenle&lt;/button&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;overflow-y-auto p-4&quot; dir=&quot;ltr&quot;&gt;&lt;code class=&quot;!whitespace-pre language-json&quot;&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;hljs-attr&quot;&gt;&quot;Routes&quot;&lt;/span&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;hljs-punctuation&quot;&gt;[&lt;/span&gt;
    &lt;span class=&quot;hljs-punctuation&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;hljs-attr&quot;&gt;&quot;DownstreamPathTemplate&quot;&lt;/span&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;hljs-string&quot;&gt;&quot;/api/users/{id}&quot;&lt;/span&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;,&lt;/span&gt;
      &lt;span class=&quot;hljs-attr&quot;&gt;&quot;DownstreamScheme&quot;&lt;/span&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;hljs-string&quot;&gt;&quot;http&quot;&lt;/span&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;,&lt;/span&gt;
      &lt;span class=&quot;hljs-attr&quot;&gt;&quot;DownstreamHostAndPorts&quot;&lt;/span&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;hljs-punctuation&quot;&gt;[&lt;/span&gt;
        &lt;span class=&quot;hljs-punctuation&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;hljs-attr&quot;&gt;&quot;Host&quot;&lt;/span&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;hljs-string&quot;&gt;&quot;user-service&quot;&lt;/span&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;hljs-attr&quot;&gt;&quot;Port&quot;&lt;/span&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;hljs-number&quot;&gt;5001&lt;/span&gt; &lt;span class=&quot;hljs-punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;,&lt;/span&gt;
        &lt;span class=&quot;hljs-punctuation&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;hljs-attr&quot;&gt;&quot;Host&quot;&lt;/span&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;hljs-string&quot;&gt;&quot;user-service&quot;&lt;/span&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;hljs-attr&quot;&gt;&quot;Port&quot;&lt;/span&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;hljs-number&quot;&gt;5002&lt;/span&gt; &lt;span class=&quot;hljs-punctuation&quot;&gt;}&lt;/span&gt;
      &lt;span class=&quot;hljs-punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;,&lt;/span&gt;
      &lt;span class=&quot;hljs-attr&quot;&gt;&quot;UpstreamPathTemplate&quot;&lt;/span&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;hljs-string&quot;&gt;&quot;/users/{id}&quot;&lt;/span&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;,&lt;/span&gt;
      &lt;span class=&quot;hljs-attr&quot;&gt;&quot;UpstreamHttpMethod&quot;&lt;/span&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;hljs-punctuation&quot;&gt;[&lt;/span&gt; &lt;span class=&quot;hljs-string&quot;&gt;&quot;Get&quot;&lt;/span&gt; &lt;span class=&quot;hljs-punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;,&lt;/span&gt;
      &lt;span class=&quot;hljs-attr&quot;&gt;&quot;LoadBalancerOptions&quot;&lt;/span&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;hljs-punctuation&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;hljs-attr&quot;&gt;&quot;Type&quot;&lt;/span&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;hljs-string&quot;&gt;&quot;RoundRobin&quot;&lt;/span&gt; &lt;span class=&quot;hljs-punctuation&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;hljs-punctuation&quot;&gt;}&lt;/span&gt;
  &lt;span class=&quot;hljs-punctuation&quot;&gt;]&lt;/span&gt;
&lt;span class=&quot;hljs-punctuation&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;h3 data-end=&quot;4113&quot; data-start=&quot;4076&quot;&gt;&lt;strong data-end=&quot;4113&quot; data-start=&quot;4080&quot;&gt;Yük Dengeleme Çalışma Mantığı&lt;/strong&gt;&lt;/h3&gt;&lt;ul data-end=&quot;4337&quot; data-start=&quot;4114&quot;&gt;&lt;li data-end=&quot;4186&quot; data-start=&quot;4114&quot;&gt;&lt;strong data-end=&quot;4184&quot; data-start=&quot;4116&quot;&gt;Ocelot, gelen istekleri sırayla farklı instancelara yönlendirir.&lt;/strong&gt;&lt;/li&gt;&lt;li data-end=&quot;4259&quot; data-start=&quot;4187&quot;&gt;&lt;strong data-end=&quot;4204&quot; data-start=&quot;4189&quot;&gt;Round Robin&lt;/strong&gt; yöntemi ile her yeni istek farklı bir servise gider.&lt;/li&gt;&lt;li data-end=&quot;4337&quot; data-start=&quot;4260&quot;&gt;&lt;strong data-end=&quot;4335&quot; data-start=&quot;4262&quot;&gt;Böylece bir servis aşırı yüklenmez, tüm instance’lar dengeli çalışır.&lt;/strong&gt;&lt;/li&gt;&lt;/ul&gt;&lt;hr data-end=&quot;4342&quot; data-start=&quot;4339&quot; /&gt;&lt;h2 data-end=&quot;4431&quot; data-start=&quot;4344&quot;&gt;&lt;strong data-end=&quot;4431&quot; data-start=&quot;4347&quot;&gt;6. Ocelot ile Authentication &amp;amp; Authorization (Kimlik Doğrulama ve Yetkilendirme)&lt;/strong&gt;&lt;/h2&gt;&lt;p data-end=&quot;4537&quot; data-start=&quot;4432&quot;&gt;Ocelot, &lt;strong data-end=&quot;4535&quot; data-start=&quot;4440&quot;&gt;JWT Token ile kimlik doğrulama (Authentication) ve yetkilendirme (Authorization) yapabilir.&lt;/strong&gt;&lt;/p&gt;&lt;p data-end=&quot;4641&quot; data-start=&quot;4539&quot;&gt;Örneğin, yalnızca belirli yetkiye sahip kullanıcıların bir endpoint’e erişebilmesini sağlayabiliriz.&lt;/p&gt;&lt;pre class=&quot;!overflow-visible&quot; data-end=&quot;5303&quot; data-start=&quot;4643&quot;&gt;&lt;div class=&quot;contain-inline-size rounded-md border-[0.5px] border-token-border-medium relative bg-token-sidebar-surface-primary dark:bg-gray-950&quot;&gt;&lt;div class=&quot;flex items-center text-token-text-secondary px-4 py-2 text-xs font-sans justify-between rounded-t-[5px] h-9 bg-token-sidebar-surface-primary dark:bg-token-main-surface-secondary select-none&quot;&gt;json&lt;/div&gt;&lt;div class=&quot;sticky top-9 md:top-[5.75rem]&quot;&gt;&lt;div class=&quot;absolute bottom-0 right-2 flex h-9 items-center&quot;&gt;&lt;div class=&quot;flex items-center rounded bg-token-sidebar-surface-primary px-2 font-sans text-xs text-token-text-secondary dark:bg-token-main-surface-secondary&quot;&gt;&lt;span class=&quot;&quot; data-state=&quot;closed&quot;&gt;&lt;button aria-label=&quot;Kopyala&quot; class=&quot;flex gap-1 items-center select-none px-4 py-1&quot;&gt;&lt;svg class=&quot;icon-xs&quot; fill=&quot;none&quot; height=&quot;24&quot; viewbox=&quot;0 0 24 24&quot; width=&quot;24&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot;&gt;&lt;path clip-rule=&quot;evenodd&quot; d=&quot;M7 5C7 3.34315 8.34315 2 10 2H19C20.6569 2 22 3.34315 22 5V14C22 15.6569 20.6569 17 19 17H17V19C17 20.6569 15.6569 22 14 22H5C3.34315 22 2 20.6569 2 19V10C2 8.34315 3.34315 7 5 7H7V5ZM9 7H14C15.6569 7 17 8.34315 17 10V15H19C19.5523 15 20 14.5523 20 14V5C20 4.44772 19.5523 4 19 4H10C9.44772 4 9 4.44772 9 5V7ZM5 9C4.44772 9 4 9.44772 4 10V19C4 19.5523 4.44772 20 5 20H14C14.5523 20 15 19.5523 15 19V10C15 9.44772 14.5523 9 14 9H5Z&quot; fill-rule=&quot;evenodd&quot; fill=&quot;currentColor&quot;&gt;&lt;/path&gt;&lt;/svg&gt;Kopyala&lt;/button&gt;&lt;/span&gt;&lt;span class=&quot;&quot; data-state=&quot;closed&quot;&gt;&lt;button class=&quot;flex select-none items-center gap-1&quot;&gt;&lt;svg class=&quot;icon-xs&quot; fill=&quot;none&quot; height=&quot;24&quot; viewbox=&quot;0 0 24 24&quot; width=&quot;24&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot;&gt;&lt;path d=&quot;M2.5 5.5C4.3 5.2 5.2 4 5.5 2.5C5.8 4 6.7 5.2 8.5 5.5C6.7 5.8 5.8 7 5.5 8.5C5.2 7 4.3 5.8 2.5 5.5Z&quot; fill=&quot;currentColor&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot; stroke=&quot;currentColor&quot;&gt;&lt;/path&gt;&lt;path d=&quot;M5.66282 16.5231L5.18413 19.3952C5.12203 19.7678 5.09098 19.9541 5.14876 20.0888C5.19933 20.2067 5.29328 20.3007 5.41118 20.3512C5.54589 20.409 5.73218 20.378 6.10476 20.3159L8.97693 19.8372C9.72813 19.712 10.1037 19.6494 10.4542 19.521C10.7652 19.407 11.0608 19.2549 11.3343 19.068C11.6425 18.8575 11.9118 18.5882 12.4503 18.0497L20 10.5C21.3807 9.11929 21.3807 6.88071 20 5.5C18.6193 4.11929 16.3807 4.11929 15 5.5L7.45026 13.0497C6.91175 13.5882 6.6425 13.8575 6.43197 14.1657C6.24513 14.4392 6.09299 14.7348 5.97903 15.0458C5.85062 15.3963 5.78802 15.7719 5.66282 16.5231Z&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot; stroke-width=&quot;2&quot; stroke=&quot;currentColor&quot;&gt;&lt;/path&gt;&lt;path d=&quot;M14.5 7L18.5 11&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot; stroke-width=&quot;2&quot; stroke=&quot;currentColor&quot;&gt;&lt;/path&gt;&lt;/svg&gt;Düzenle&lt;/button&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;overflow-y-auto p-4&quot; dir=&quot;ltr&quot;&gt;&lt;code class=&quot;!whitespace-pre language-json&quot;&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;hljs-attr&quot;&gt;&quot;Routes&quot;&lt;/span&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;hljs-punctuation&quot;&gt;[&lt;/span&gt;
    &lt;span class=&quot;hljs-punctuation&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;hljs-attr&quot;&gt;&quot;DownstreamPathTemplate&quot;&lt;/span&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;hljs-string&quot;&gt;&quot;/api/orders&quot;&lt;/span&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;,&lt;/span&gt;
      &lt;span class=&quot;hljs-attr&quot;&gt;&quot;DownstreamScheme&quot;&lt;/span&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;hljs-string&quot;&gt;&quot;http&quot;&lt;/span&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;,&lt;/span&gt;
      &lt;span class=&quot;hljs-attr&quot;&gt;&quot;DownstreamHostAndPorts&quot;&lt;/span&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;hljs-punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;hljs-attr&quot;&gt;&quot;Host&quot;&lt;/span&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;hljs-string&quot;&gt;&quot;order-service&quot;&lt;/span&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;hljs-attr&quot;&gt;&quot;Port&quot;&lt;/span&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;hljs-number&quot;&gt;5003&lt;/span&gt; &lt;span class=&quot;hljs-punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;,&lt;/span&gt;
      &lt;span class=&quot;hljs-attr&quot;&gt;&quot;UpstreamPathTemplate&quot;&lt;/span&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;hljs-string&quot;&gt;&quot;/orders&quot;&lt;/span&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;,&lt;/span&gt;
      &lt;span class=&quot;hljs-attr&quot;&gt;&quot;UpstreamHttpMethod&quot;&lt;/span&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;hljs-punctuation&quot;&gt;[&lt;/span&gt; &lt;span class=&quot;hljs-string&quot;&gt;&quot;Get&quot;&lt;/span&gt; &lt;span class=&quot;hljs-punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;,&lt;/span&gt;
      &lt;span class=&quot;hljs-attr&quot;&gt;&quot;AuthenticationOptions&quot;&lt;/span&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;hljs-punctuation&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;hljs-attr&quot;&gt;&quot;AuthenticationProviderKey&quot;&lt;/span&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;hljs-string&quot;&gt;&quot;Bearer&quot;&lt;/span&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;,&lt;/span&gt;
        &lt;span class=&quot;hljs-attr&quot;&gt;&quot;AllowedScopes&quot;&lt;/span&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;hljs-punctuation&quot;&gt;[&lt;/span&gt; &lt;span class=&quot;hljs-string&quot;&gt;&quot;order.read&quot;&lt;/span&gt; &lt;span class=&quot;hljs-punctuation&quot;&gt;]&lt;/span&gt;
      &lt;span class=&quot;hljs-punctuation&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;hljs-punctuation&quot;&gt;}&lt;/span&gt;
  &lt;span class=&quot;hljs-punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;,&lt;/span&gt;
  &lt;span class=&quot;hljs-attr&quot;&gt;&quot;GlobalConfiguration&quot;&lt;/span&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;hljs-punctuation&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;hljs-attr&quot;&gt;&quot;BaseUrl&quot;&lt;/span&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;hljs-string&quot;&gt;&quot;https://api.example.com&quot;&lt;/span&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;hljs-attr&quot;&gt;&quot;AuthenticationProviders&quot;&lt;/span&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;hljs-punctuation&quot;&gt;[&lt;/span&gt;
      &lt;span class=&quot;hljs-punctuation&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;hljs-attr&quot;&gt;&quot;Name&quot;&lt;/span&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;hljs-string&quot;&gt;&quot;Bearer&quot;&lt;/span&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;,&lt;/span&gt;
        &lt;span class=&quot;hljs-attr&quot;&gt;&quot;Provider&quot;&lt;/span&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;hljs-string&quot;&gt;&quot;IdentityServer&quot;&lt;/span&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;,&lt;/span&gt;
        &lt;span class=&quot;hljs-attr&quot;&gt;&quot;ProviderRootUrl&quot;&lt;/span&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;hljs-string&quot;&gt;&quot;https://auth.example.com&quot;&lt;/span&gt;
      &lt;span class=&quot;hljs-punctuation&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;hljs-punctuation&quot;&gt;]&lt;/span&gt;
  &lt;span class=&quot;hljs-punctuation&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;hljs-punctuation&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;h3 data-end=&quot;5345&quot; data-start=&quot;5305&quot;&gt;&lt;strong data-end=&quot;5345&quot; data-start=&quot;5309&quot;&gt;Kimlik Doğrulama Çalışma Mantığı&lt;/strong&gt;&lt;/h3&gt;&lt;ol data-end=&quot;5588&quot; data-start=&quot;5346&quot;&gt;&lt;li data-end=&quot;5433&quot; data-start=&quot;5346&quot;&gt;&lt;strong data-end=&quot;5431&quot; data-start=&quot;5349&quot;&gt;Client önce bir kimlik doğrulama sunucusundan (IdentityServer) JWT token alır.&lt;/strong&gt;&lt;/li&gt;&lt;li data-end=&quot;5492&quot; data-start=&quot;5434&quot;&gt;&lt;strong data-end=&quot;5490&quot; data-start=&quot;5437&quot;&gt;API Gateway’e istek yaparken bu token’ı gönderir.&lt;/strong&gt;&lt;/li&gt;&lt;li data-end=&quot;5588&quot; data-start=&quot;5493&quot;&gt;&lt;strong data-end=&quot;5586&quot; data-start=&quot;5496&quot;&gt;Ocelot, token’ı kontrol eder ve yetkisi varsa isteği ilgili mikro servise yönlendirir.&lt;/strong&gt;&lt;/li&gt;&lt;/ol&gt;&lt;hr data-end=&quot;5593&quot; data-start=&quot;5590&quot; /&gt;&lt;h2 data-end=&quot;5657&quot; data-start=&quot;5595&quot;&gt;&lt;strong data-end=&quot;5655&quot; data-start=&quot;5598&quot;&gt;Sonuç: Ocelot’un API Gateway Yönlendirmesi Ne Sağlar?&lt;/strong&gt;&lt;/h2&gt;&lt;p data-end=&quot;6138&quot; data-start=&quot;5659&quot;&gt;✔ &lt;strong data-end=&quot;5685&quot; data-start=&quot;5661&quot;&gt;Merkezi API Yönetimi&lt;/strong&gt; → Tüm mikro servisleri tek bir noktadan yönetmeyi sağlar.&lt;br data-end=&quot;5746&quot; data-start=&quot;5743&quot; /&gt;✔ &lt;strong data-end=&quot;5782&quot; data-start=&quot;5748&quot;&gt;Yük Dengeleme (Load Balancing)&lt;/strong&gt; → Mikro servis instanceları arasında istekleri dengeler.&lt;br data-end=&quot;5842&quot; data-start=&quot;5839&quot; /&gt;✔ &lt;strong data-end=&quot;5897&quot; data-start=&quot;5844&quot;&gt;Kimlik Doğrulama (Authentication &amp;amp; Authorization)&lt;/strong&gt; → JWT token veya OAuth ile güvenli erişim sunar.&lt;br data-end=&quot;5949&quot; data-start=&quot;5946&quot; /&gt;✔ &lt;strong data-end=&quot;5978&quot; data-start=&quot;5951&quot;&gt;Caching &amp;amp; Rate Limiting&lt;/strong&gt; → Sık yapılan istekleri cache’leyerek performansı artırır.&lt;br data-end=&quot;6040&quot; data-start=&quot;6037&quot; /&gt;✔ &lt;strong data-end=&quot;6066&quot; data-start=&quot;6042&quot;&gt;Logging &amp;amp; Monitoring&lt;/strong&gt; → Gelen/giden istekleri loglayarak hata takibi yapmayı kolaylaştırır.&lt;/p&gt;&lt;p data-end=&quot;6247&quot; data-is-last-node=&quot;&quot; data-is-only-node=&quot;&quot; data-start=&quot;6140&quot;&gt;&lt;strong data-end=&quot;6244&quot; data-start=&quot;6140&quot;&gt;Sonuç olarak, Ocelot, .NET tabanlı mikroservis mimarisinde güçlü ve esnek bir API Gateway çözümüdür.&lt;/strong&gt; 🚀&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://mehmetyoldas.blogspot.com/feeds/6377301215768429283/comments/default' title='Kayıt Yorumları'/><link rel='replies' type='text/html' href='http://mehmetyoldas.blogspot.com/2025/03/ocelot-detayl-anlatm.html#comment-form' title='0 Yorum'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5628326400009361051/posts/default/6377301215768429283'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5628326400009361051/posts/default/6377301215768429283'/><link rel='alternate' type='text/html' href='http://mehmetyoldas.blogspot.com/2025/03/ocelot-detayl-anlatm.html' title='Ocelot Detaylı Anlatım'/><author><name>Mehmet Yoldaş</name><uri>http://www.blogger.com/profile/17372934623166164299</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVw6x10V3awMwQJFzrhYEEvr-YMR-YcaKARcY29nS8Ny67irGfpUKqZ4uvXuwn6LQhPqNtJq5NQ4rkOE0x29vlgd4UNHA9D6B3uo8_D6VU7-5TZyDRRW-W6MAgLjn7DA/s220/profil+Ba%C5%9Fak+Foto%C4%9Fraf%C3%A7%C4%B1l%C4%B1k.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5628326400009361051.post-9128822635586069326</id><published>2025-03-02T14:14:00.003+03:00</published><updated>2025-03-02T14:14:11.509+03:00</updated><title type='text'>Mikroservislerde Replikasyonun Az Kullanıldığı Senaryolar</title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p data-end=&quot;1638&quot; data-start=&quot;1568&quot;&gt;❌ &lt;strong data-end=&quot;1636&quot; data-start=&quot;1570&quot;&gt;1. Mikroservislerin Kendi Veritabanına Sahip Olduğu Senaryolar&lt;/strong&gt;&lt;/p&gt;&lt;ul data-end=&quot;1837&quot; data-start=&quot;1639&quot;&gt;&lt;li data-end=&quot;1738&quot; data-start=&quot;1639&quot;&gt;Eğer &lt;strong data-end=&quot;1700&quot; data-start=&quot;1646&quot;&gt;her mikro servis yalnızca kendi verisini işliyorsa&lt;/strong&gt;, &lt;strong data-end=&quot;1735&quot; data-start=&quot;1702&quot;&gt;replikasyon gereksiz olabilir&lt;/strong&gt;.&lt;/li&gt;&lt;li data-end=&quot;1837&quot; data-start=&quot;1739&quot;&gt;&lt;strong data-end=&quot;1835&quot; data-start=&quot;1741&quot;&gt;Bunun yerine Event Sourcing veya Message Queue sistemleriyle veri paylaşımı tercih edilir.&lt;/strong&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p data-end=&quot;1900&quot; data-start=&quot;1839&quot;&gt;❌ &lt;strong data-end=&quot;1898&quot; data-start=&quot;1841&quot;&gt;2. Dağıtık Veri Tutarlılığının Kritik Olduğu Durumlar&lt;/strong&gt;&lt;/p&gt;&lt;ul data-end=&quot;2174&quot; data-start=&quot;1901&quot;&gt;&lt;li data-end=&quot;2037&quot; data-start=&quot;1901&quot;&gt;&lt;strong data-end=&quot;1968&quot; data-start=&quot;1903&quot;&gt;Replikasyon &quot;eventual consistency&quot; prensibiyle çalıştığı için&lt;/strong&gt; anlık veri tutarlılığı gerektiren senaryolarda risk oluşturabilir.&lt;/li&gt;&lt;li data-end=&quot;2174&quot; data-start=&quot;2038&quot;&gt;&lt;strong data-end=&quot;2098&quot; data-start=&quot;2040&quot;&gt;Gerçek zamanlı bankacılık işlemleri veya stok yönetimi&lt;/strong&gt; gibi uygulamalarda &lt;strong data-end=&quot;2159&quot; data-start=&quot;2118&quot;&gt;strong consistency (güçlü tutarlılık)&lt;/strong&gt; gerekebilir.&lt;/li&gt;&lt;/ul&gt;</content><link rel='replies' type='application/atom+xml' href='http://mehmetyoldas.blogspot.com/feeds/9128822635586069326/comments/default' title='Kayıt Yorumları'/><link rel='replies' type='text/html' href='http://mehmetyoldas.blogspot.com/2025/03/mikroservislerde-replikasyonun-az.html#comment-form' title='0 Yorum'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5628326400009361051/posts/default/9128822635586069326'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5628326400009361051/posts/default/9128822635586069326'/><link rel='alternate' type='text/html' href='http://mehmetyoldas.blogspot.com/2025/03/mikroservislerde-replikasyonun-az.html' title='Mikroservislerde Replikasyonun Az Kullanıldığı Senaryolar'/><author><name>Mehmet Yoldaş</name><uri>http://www.blogger.com/profile/17372934623166164299</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVw6x10V3awMwQJFzrhYEEvr-YMR-YcaKARcY29nS8Ny67irGfpUKqZ4uvXuwn6LQhPqNtJq5NQ4rkOE0x29vlgd4UNHA9D6B3uo8_D6VU7-5TZyDRRW-W6MAgLjn7DA/s220/profil+Ba%C5%9Fak+Foto%C4%9Fraf%C3%A7%C4%B1l%C4%B1k.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5628326400009361051.post-8312566869764858327</id><published>2025-03-02T14:11:00.001+03:00</published><updated>2025-03-02T14:11:22.803+03:00</updated><title type='text'> Mikroservis mimarisinde veri yönetim şekilleri</title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;strong data-end=&quot;112&quot; data-start=&quot;0&quot;&gt;Mikroservis mimarisinde en iyi veya en çok kullanılan veri yönetim yöntemi, sistemin ihtiyaçlarına bağlıdır.&lt;/strong&gt; Ancak, &lt;strong data-end=&quot;231&quot; data-start=&quot;120&quot;&gt;genel olarak en çok tercih edilen ve ölçeklenebilirliği artıran yöntem &quot;Database per Service&quot; yaklaşımıdır.&lt;/strong&gt;&lt;/p&gt;&lt;p data-end=&quot;368&quot; data-start=&quot;235&quot;&gt;Buna ek olarak, &lt;strong data-end=&quot;311&quot; data-start=&quot;251&quot;&gt;yüksek ölçeklenebilirlik, performans ve veri tutarlılığı&lt;/strong&gt; sağlamak için aşağıdaki teknikler birlikte kullanılır:&lt;/p&gt;&lt;hr data-end=&quot;373&quot; data-start=&quot;370&quot; /&gt;&lt;h3 data-end=&quot;448&quot; data-start=&quot;375&quot;&gt;&lt;strong data-end=&quot;446&quot; data-start=&quot;379&quot;&gt;1. En Çok Kullanılan ve Önerilen Yöntem: &quot;Database per Service&quot;&lt;/strong&gt;&lt;/h3&gt;&lt;p data-end=&quot;555&quot; data-start=&quot;449&quot;&gt;Bu yöntemde, &lt;strong data-end=&quot;510&quot; data-start=&quot;462&quot;&gt;her mikro servis kendi veritabanına sahiptir&lt;/strong&gt; ve birbirlerinden bağımsız olarak çalışır.&lt;/p&gt;&lt;p data-end=&quot;868&quot; data-start=&quot;557&quot;&gt;✔ &lt;strong data-end=&quot;597&quot; data-start=&quot;559&quot;&gt;Bağımsız ölçeklenebilirlik sağlar.&lt;/strong&gt;&lt;br data-end=&quot;600&quot; data-start=&quot;597&quot; /&gt;✔ &lt;strong data-end=&quot;672&quot; data-start=&quot;602&quot;&gt;Mikro servislerin birbirini etkilemeden gelişmesini kolaylaştırır.&lt;/strong&gt;&lt;br data-end=&quot;675&quot; data-start=&quot;672&quot; /&gt;✔ &lt;strong data-end=&quot;757&quot; data-start=&quot;677&quot;&gt;Farklı servisler için en uygun veritabanı seçilebilir (SQL veya NoSQL gibi).&lt;/strong&gt;&lt;br data-end=&quot;760&quot; data-start=&quot;757&quot; /&gt;⚠ &lt;strong data-end=&quot;866&quot; data-start=&quot;762&quot;&gt;Ancak, dağıtık veri tutarlılığı (Consistency) ve sorgulama karmaşıklığı gibi bazı zorlukları vardır.&lt;/strong&gt;&lt;/p&gt;&lt;p data-end=&quot;925&quot; data-start=&quot;870&quot;&gt;&lt;strong data-end=&quot;923&quot; data-start=&quot;870&quot;&gt;Bu yüzden aşağıdaki ek teknikler ile desteklenir:&lt;/strong&gt;&lt;/p&gt;&lt;hr data-end=&quot;930&quot; data-start=&quot;927&quot; /&gt;&lt;h3 data-end=&quot;1005&quot; data-start=&quot;932&quot;&gt;&lt;strong data-end=&quot;1003&quot; data-start=&quot;936&quot;&gt;2. Okuma-Yazma Performansını Artırmak için CQRS + Read Replicas&lt;/strong&gt;&lt;/h3&gt;&lt;ul data-end=&quot;1271&quot; data-start=&quot;1006&quot;&gt;&lt;li data-end=&quot;1158&quot; data-start=&quot;1006&quot;&gt;&lt;strong data-end=&quot;1059&quot; data-start=&quot;1008&quot;&gt;CQRS (Command Query Responsibility Segregation)&lt;/strong&gt;: Okuma (Read) ve yazma (Write) işlemlerini farklı veri kaynaklarına yönlendirerek yükü dengeler.&lt;/li&gt;&lt;li data-end=&quot;1271&quot; data-start=&quot;1159&quot;&gt;&lt;strong data-end=&quot;1178&quot; data-start=&quot;1161&quot;&gt;Read Replicas&lt;/strong&gt;: Okuma işlemleri için &lt;strong data-end=&quot;1236&quot; data-start=&quot;1201&quot;&gt;veritabanı kopyaları (replicas)&lt;/strong&gt; oluşturularak &lt;strong data-end=&quot;1268&quot; data-start=&quot;1251&quot;&gt;yük dağıtılır&lt;/strong&gt;.&lt;/li&gt;&lt;/ul&gt;&lt;p data-end=&quot;1484&quot; data-start=&quot;1273&quot;&gt;✔ &lt;strong data-end=&quot;1316&quot; data-start=&quot;1275&quot;&gt;Okuma işlemleri çok hızlı hale gelir.&lt;/strong&gt;&lt;br data-end=&quot;1319&quot; data-start=&quot;1316&quot; /&gt;✔ &lt;strong data-end=&quot;1362&quot; data-start=&quot;1321&quot;&gt;Ana veritabanı üzerindeki yük azalır.&lt;/strong&gt;&lt;br data-end=&quot;1365&quot; data-start=&quot;1362&quot; /&gt;⚠ &lt;strong data-end=&quot;1482&quot; data-start=&quot;1367&quot;&gt;Yazma işlemleri tutarsızlık sorunları yaratabilir, bu yüzden eventual consistency göz önünde bulundurulmalıdır.&lt;/strong&gt;&lt;/p&gt;&lt;hr data-end=&quot;1489&quot; data-start=&quot;1486&quot; /&gt;&lt;h3 data-end=&quot;1550&quot; data-start=&quot;1491&quot;&gt;&lt;strong data-end=&quot;1548&quot; data-start=&quot;1495&quot;&gt;3. Dağıtık İşlemler İçin &quot;Saga Pattern&quot; Kullanımı&lt;/strong&gt;&lt;/h3&gt;&lt;p data-end=&quot;1624&quot; data-start=&quot;1551&quot;&gt;&lt;strong data-end=&quot;1622&quot; data-start=&quot;1551&quot;&gt;Veri tutarlılığı (Data Consistency) en büyük problemlerden biridir.&lt;/strong&gt;&lt;/p&gt;&lt;ul data-end=&quot;1813&quot; data-start=&quot;1625&quot;&gt;&lt;li data-end=&quot;1728&quot; data-start=&quot;1625&quot;&gt;&lt;strong data-end=&quot;1643&quot; data-start=&quot;1627&quot;&gt;Saga Pattern&lt;/strong&gt;, birden fazla mikro servis arasında uzun süren işlemleri yönetmek için kullanılır.&lt;/li&gt;&lt;li data-end=&quot;1813&quot; data-start=&quot;1729&quot;&gt;&lt;strong data-end=&quot;1811&quot; data-start=&quot;1731&quot;&gt;Event-Driven (Olay Tabanlı) yaklaşım ile servisler birbirleriyle haberleşir.&lt;/strong&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p data-end=&quot;1967&quot; data-start=&quot;1815&quot;&gt;✔ &lt;strong data-end=&quot;1901&quot; data-start=&quot;1817&quot;&gt;Dağıtık işlemlerin başarısız olması durumunda geri alma (rollback) sağlanabilir.&lt;/strong&gt;&lt;br data-end=&quot;1904&quot; data-start=&quot;1901&quot; /&gt;⚠ &lt;strong data-end=&quot;1965&quot; data-start=&quot;1906&quot;&gt;Senaryoya bağlı olarak karmaşık bir yapı oluşturabilir.&lt;/strong&gt;&lt;/p&gt;&lt;hr data-end=&quot;1972&quot; data-start=&quot;1969&quot; /&gt;&lt;h3 data-end=&quot;2024&quot; data-start=&quot;1974&quot;&gt;&lt;strong data-end=&quot;2022&quot; data-start=&quot;1978&quot;&gt;4. Büyük Ölçekli Sistemlerde: &quot;Sharding&quot;&lt;/strong&gt;&lt;/h3&gt;&lt;ul data-end=&quot;2216&quot; data-start=&quot;2025&quot;&gt;&lt;li data-end=&quot;2114&quot; data-start=&quot;2025&quot;&gt;Veriyi &lt;strong data-end=&quot;2075&quot; data-start=&quot;2034&quot;&gt;belli kriterlere göre bölerek (shard)&lt;/strong&gt;, birden fazla veritabanına dağıtmak.&lt;/li&gt;&lt;li data-end=&quot;2216&quot; data-start=&quot;2115&quot;&gt;Örneğin, kullanıcı verilerini &lt;strong data-end=&quot;2205&quot; data-start=&quot;2147&quot;&gt;bölgelere (region) veya müşteri kimlik numarasına göre&lt;/strong&gt; ayırmak.&lt;/li&gt;&lt;/ul&gt;&lt;p data-end=&quot;2295&quot; data-start=&quot;2218&quot;&gt;✔ &lt;strong data-end=&quot;2256&quot; data-start=&quot;2220&quot;&gt;Yüksek ölçeklenebilirlik sağlar.&lt;/strong&gt;&lt;br data-end=&quot;2259&quot; data-start=&quot;2256&quot; /&gt;⚠ &lt;strong data-end=&quot;2293&quot; data-start=&quot;2261&quot;&gt;Veri sorgulama zorlaşabilir.&lt;/strong&gt;&lt;/p&gt;&lt;hr data-end=&quot;2300&quot; data-start=&quot;2297&quot; /&gt;&lt;h3 data-end=&quot;2373&quot; data-start=&quot;2302&quot;&gt;&lt;strong data-end=&quot;2371&quot; data-start=&quot;2306&quot;&gt;5. Event Sourcing + Message Queue (Kafka, RabbitMQ) Kullanımı&lt;/strong&gt;&lt;/h3&gt;&lt;ul data-end=&quot;2556&quot; data-start=&quot;2374&quot;&gt;&lt;li data-end=&quot;2468&quot; data-start=&quot;2374&quot;&gt;&lt;strong data-end=&quot;2422&quot; data-start=&quot;2376&quot;&gt;Tüm verileri olay tabanlı olarak kaydetmek&lt;/strong&gt; ve servislere olaylar aracılığıyla iletmek.&lt;/li&gt;&lt;li data-end=&quot;2556&quot; data-start=&quot;2469&quot;&gt;&lt;strong data-end=&quot;2512&quot; data-start=&quot;2471&quot;&gt;Kafka, RabbitMQ gibi mesaj kuyrukları&lt;/strong&gt; ile &lt;strong data-end=&quot;2544&quot; data-start=&quot;2517&quot;&gt;asenkron veri paylaşımı&lt;/strong&gt; sağlanır.&lt;/li&gt;&lt;/ul&gt;&lt;p data-end=&quot;2745&quot; data-start=&quot;2558&quot;&gt;✔ &lt;strong data-end=&quot;2613&quot; data-start=&quot;2560&quot;&gt;Mikro servisler birbirinden bağımsız çalışabilir.&lt;/strong&gt;&lt;br data-end=&quot;2616&quot; data-start=&quot;2613&quot; /&gt;✔ &lt;strong data-end=&quot;2661&quot; data-start=&quot;2618&quot;&gt;Veri geçmişini saklama avantajı sağlar.&lt;/strong&gt;&lt;br data-end=&quot;2664&quot; data-start=&quot;2661&quot; /&gt;⚠ &lt;strong data-end=&quot;2743&quot; data-start=&quot;2666&quot;&gt;Gerçek zamanlı tutarlılık yerine &quot;eventual consistency&quot; modeli uygulanır.&lt;/strong&gt;&lt;/p&gt;&lt;hr data-end=&quot;2750&quot; data-start=&quot;2747&quot; /&gt;&lt;h3 data-end=&quot;2798&quot; data-start=&quot;2752&quot;&gt;&lt;strong data-end=&quot;2796&quot; data-start=&quot;2756&quot;&gt;Sonuç: En Çok Kullanılan Kombinasyon&lt;/strong&gt;&lt;/h3&gt;&lt;p data-end=&quot;3197&quot; data-start=&quot;2799&quot;&gt;Gerçek dünyada büyük ölçekli sistemlerde &lt;strong data-end=&quot;2877&quot; data-start=&quot;2840&quot;&gt;en çok kullanılan yaklaşım şudur:&lt;/strong&gt;&lt;br data-end=&quot;2880&quot; data-start=&quot;2877&quot; /&gt;✅ &lt;strong data-end=&quot;2906&quot; data-start=&quot;2882&quot;&gt;Database per Service&lt;/strong&gt; yaklaşımı (&lt;strong data-end=&quot;2961&quot; data-start=&quot;2918&quot;&gt;her mikro servisin kendi veritabanı var&lt;/strong&gt;)&lt;br data-end=&quot;2965&quot; data-start=&quot;2962&quot; /&gt;✅ &lt;strong data-end=&quot;3023&quot; data-start=&quot;2967&quot;&gt;CQRS + Read Replicas (Okuma ve Yazma ayrı yönetilir)&lt;/strong&gt;&lt;br data-end=&quot;3026&quot; data-start=&quot;3023&quot; /&gt;✅ &lt;strong data-end=&quot;3068&quot; data-start=&quot;3028&quot;&gt;Saga Pattern (Dağıtık işlemler için)&lt;/strong&gt;&lt;br data-end=&quot;3071&quot; data-start=&quot;3068&quot; /&gt;✅ &lt;strong data-end=&quot;3135&quot; data-start=&quot;3073&quot;&gt;Message Queue + Event Sourcing (Veri senkronizasyonu için)&lt;/strong&gt;&lt;br data-end=&quot;3138&quot; data-start=&quot;3135&quot; /&gt;✅ &lt;strong data-end=&quot;3195&quot; data-start=&quot;3140&quot;&gt;Sharding (Çok büyük sistemlerde veriyi bölmek için)&lt;/strong&gt;&lt;/p&gt;&lt;p data-end=&quot;3320&quot; data-is-last-node=&quot;&quot; data-is-only-node=&quot;&quot; data-start=&quot;3199&quot;&gt;Bu kombinasyon, &lt;strong data-end=&quot;3257&quot; data-start=&quot;3215&quot;&gt;yüksek ölçeklenebilirlik ve performans&lt;/strong&gt; sağlarken &lt;strong data-end=&quot;3319&quot; data-start=&quot;3268&quot;&gt;bağımsız geliştirme ve dağıtımı da mümkün kılar&lt;/strong&gt;.&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://mehmetyoldas.blogspot.com/feeds/8312566869764858327/comments/default' title='Kayıt Yorumları'/><link rel='replies' type='text/html' href='http://mehmetyoldas.blogspot.com/2025/03/mikroservis-mimarisinde-veri-yonetim.html#comment-form' title='0 Yorum'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5628326400009361051/posts/default/8312566869764858327'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5628326400009361051/posts/default/8312566869764858327'/><link rel='alternate' type='text/html' href='http://mehmetyoldas.blogspot.com/2025/03/mikroservis-mimarisinde-veri-yonetim.html' title=' Mikroservis mimarisinde veri yönetim şekilleri'/><author><name>Mehmet Yoldaş</name><uri>http://www.blogger.com/profile/17372934623166164299</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVw6x10V3awMwQJFzrhYEEvr-YMR-YcaKARcY29nS8Ny67irGfpUKqZ4uvXuwn6LQhPqNtJq5NQ4rkOE0x29vlgd4UNHA9D6B3uo8_D6VU7-5TZyDRRW-W6MAgLjn7DA/s220/profil+Ba%C5%9Fak+Foto%C4%9Fraf%C3%A7%C4%B1l%C4%B1k.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5628326400009361051.post-8882136574164092576</id><published>2025-03-02T14:07:00.001+03:00</published><updated>2025-03-02T14:07:04.646+03:00</updated><title type='text'>Her mikro servisin kendi veritabanı atomik midir, mükerrer kayıtlar içerebilir mi?</title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;strong data-end=&quot;125&quot; data-start=&quot;90&quot;&gt;1. Atomiklik ve Mikroservisler:&lt;/strong&gt;&lt;/p&gt;&lt;ul data-end=&quot;480&quot; data-start=&quot;128&quot;&gt;&lt;li data-end=&quot;341&quot; data-start=&quot;128&quot;&gt;Eğer her mikro servis &lt;strong data-end=&quot;282&quot; data-start=&quot;152&quot;&gt;kendi veritabanında ACID (Atomicity, Consistency, Isolation, Durability) özelliklerini destekleyen bir veritabanı kullanıyorsa&lt;/strong&gt;, &lt;strong data-end=&quot;338&quot; data-start=&quot;284&quot;&gt;o mikro servisin içindeki işlemler atomik olabilir&lt;/strong&gt;.&lt;/li&gt;&lt;li data-end=&quot;480&quot; data-start=&quot;342&quot;&gt;Ancak, &lt;strong data-end=&quot;385&quot; data-start=&quot;351&quot;&gt;mikro servisler arası işlemler&lt;/strong&gt; atomik değildir çünkü her servis kendi veritabanına sahiptir ve dağıtık bir ortamda çalışır.&lt;/li&gt;&lt;/ul&gt;&lt;p data-end=&quot;599&quot; data-start=&quot;482&quot;&gt;&lt;strong data-end=&quot;521&quot; data-start=&quot;482&quot;&gt;2. Mükerrer Kayıtlar Oluşabilir mi?&lt;/strong&gt;&lt;br data-end=&quot;524&quot; data-start=&quot;521&quot; /&gt;Evet, &lt;strong data-end=&quot;562&quot; data-start=&quot;530&quot;&gt;mükerrer kayıtlar oluşabilir&lt;/strong&gt;, özellikle aşağıdaki senaryolarda:&lt;/p&gt;&lt;ul data-end=&quot;1006&quot; data-start=&quot;600&quot;&gt;&lt;li data-end=&quot;791&quot; data-start=&quot;600&quot;&gt;&lt;strong data-end=&quot;642&quot; data-start=&quot;602&quot;&gt;Dağıtık sistemlerde network hataları&lt;/strong&gt;: Örneğin, bir sipariş servisi ödeme bilgisini aldıktan sonra ağ kesintisi nedeniyle işlemi tekrar edebilir ve aynı sipariş iki kez kaydedilebilir.&lt;/li&gt;&lt;li data-end=&quot;1006&quot; data-start=&quot;792&quot;&gt;&lt;strong data-end=&quot;837&quot; data-start=&quot;794&quot;&gt;Event-Driven (Olay Tabanlı) Mimarilerde&lt;/strong&gt;: Mikro servisler arasında &lt;strong data-end=&quot;882&quot; data-start=&quot;864&quot;&gt;event sourcing&lt;/strong&gt; veya &lt;strong data-end=&quot;905&quot; data-start=&quot;888&quot;&gt;mesaj kuyruğu&lt;/strong&gt; (Kafka, RabbitMQ) gibi sistemler kullanıldığında, mesajlar bazen &lt;strong data-end=&quot;1003&quot; data-start=&quot;971&quot;&gt;birden fazla kez işlenebilir&lt;/strong&gt;.&lt;/li&gt;&lt;/ul&gt;&lt;p data-end=&quot;1089&quot; data-start=&quot;1008&quot;&gt;&lt;strong data-end=&quot;1028&quot; data-start=&quot;1008&quot;&gt;3. Çözüm Yolları&lt;/strong&gt;&lt;br data-end=&quot;1031&quot; data-start=&quot;1028&quot; /&gt;Mükerrer kayıtları önlemek için şu yöntemler kullanılır:&lt;/p&gt;&lt;ul data-end=&quot;1532&quot; data-start=&quot;1090&quot;&gt;&lt;li data-end=&quot;1252&quot; data-start=&quot;1090&quot;&gt;&lt;strong data-end=&quot;1115&quot; data-start=&quot;1092&quot;&gt;Idempotent İşlemler&lt;/strong&gt;: Aynı verinin tekrar işlendiğinde farklı bir sonuç üretmemesi sağlanır (örneğin, aynı sipariş numarasına sahip kayıt tekrar işlenmez).&lt;/li&gt;&lt;li data-end=&quot;1412&quot; data-start=&quot;1253&quot;&gt;&lt;strong data-end=&quot;1298&quot; data-start=&quot;1255&quot;&gt;Unique Constraints (Benzersiz Kısıtlar)&lt;/strong&gt;: Veritabanında &lt;strong data-end=&quot;1352&quot; data-start=&quot;1314&quot;&gt;benzersiz indeksler (unique index)&lt;/strong&gt; kullanılarak aynı verinin tekrar kaydedilmesi engellenir.&lt;/li&gt;&lt;li data-end=&quot;1532&quot; data-start=&quot;1413&quot;&gt;&lt;strong data-end=&quot;1452&quot; data-start=&quot;1415&quot;&gt;Distributed Transactions Yönetimi&lt;/strong&gt;: &lt;strong data-end=&quot;1470&quot; data-start=&quot;1454&quot;&gt;Saga Pattern&lt;/strong&gt; gibi desenlerle &lt;strong data-end=&quot;1507&quot; data-start=&quot;1487&quot;&gt;dağıtık işlemler&lt;/strong&gt; kontrol altına alınır.&lt;/li&gt;&lt;/ul&gt;&lt;h3 data-end=&quot;1550&quot; data-start=&quot;1534&quot;&gt;&lt;strong data-end=&quot;1548&quot; data-start=&quot;1538&quot;&gt;Sonuç:&lt;/strong&gt;&lt;/h3&gt;&lt;ul data-end=&quot;1784&quot; data-is-last-node=&quot;&quot; data-is-only-node=&quot;&quot; data-start=&quot;1551&quot;&gt;&lt;li data-end=&quot;1666&quot; data-start=&quot;1551&quot;&gt;&lt;strong data-end=&quot;1584&quot; data-start=&quot;1553&quot;&gt;Tek bir mikro servis içinde&lt;/strong&gt; atomiklik sağlanabilir ama &lt;strong data-end=&quot;1663&quot; data-start=&quot;1612&quot;&gt;mikro servisler arası atomiklik garanti edilmez&lt;/strong&gt;.&lt;/li&gt;&lt;li data-end=&quot;1784&quot; data-is-last-node=&quot;&quot; data-start=&quot;1667&quot;&gt;&lt;strong data-end=&quot;1699&quot; data-start=&quot;1669&quot;&gt;Mükerrer kayıtlar olabilir&lt;/strong&gt;, ancak idempotency, unique constraints ve saga pattern gibi yöntemlerle önlenebilir.&lt;/li&gt;&lt;/ul&gt;</content><link rel='replies' type='application/atom+xml' href='http://mehmetyoldas.blogspot.com/feeds/8882136574164092576/comments/default' title='Kayıt Yorumları'/><link rel='replies' type='text/html' href='http://mehmetyoldas.blogspot.com/2025/03/her-mikro-servisin-kendi-veritaban.html#comment-form' title='0 Yorum'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5628326400009361051/posts/default/8882136574164092576'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5628326400009361051/posts/default/8882136574164092576'/><link rel='alternate' type='text/html' href='http://mehmetyoldas.blogspot.com/2025/03/her-mikro-servisin-kendi-veritaban.html' title='Her mikro servisin kendi veritabanı atomik midir, mükerrer kayıtlar içerebilir mi?'/><author><name>Mehmet Yoldaş</name><uri>http://www.blogger.com/profile/17372934623166164299</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVw6x10V3awMwQJFzrhYEEvr-YMR-YcaKARcY29nS8Ny67irGfpUKqZ4uvXuwn6LQhPqNtJq5NQ4rkOE0x29vlgd4UNHA9D6B3uo8_D6VU7-5TZyDRRW-W6MAgLjn7DA/s220/profil+Ba%C5%9Fak+Foto%C4%9Fraf%C3%A7%C4%B1l%C4%B1k.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5628326400009361051.post-3060144252035112712</id><published>2025-03-02T14:06:00.003+03:00</published><updated>2025-03-02T14:06:30.495+03:00</updated><title type='text'>Mikroservis Mimarisi ve Veritabanı Yaklaşımları</title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;strong data-end=&quot;67&quot; data-start=&quot;0&quot;&gt;Microservice mimarisinde en çok kullanılan veritabanı yaklaşımı&lt;/strong&gt;, genellikle &lt;strong data-end=&quot;134&quot; data-start=&quot;80&quot;&gt;her mikro servisin kendi veritabanına sahip olması&lt;/strong&gt; (Database per Service) yaklaşımıdır. Bu yaklaşım, her mikro servisin bağımsız bir şekilde çalışabilmesini sağlar, böylece servisler birbirinden bağımsız olarak geliştirilip dağıtılabilir.&lt;/p&gt;&lt;h3 data-end=&quot;379&quot; data-start=&quot;324&quot;&gt;&lt;strong data-end=&quot;379&quot; data-start=&quot;328&quot;&gt;Mikroservis Mimarisi ve Veritabanı Yaklaşımları&lt;/strong&gt;&lt;/h3&gt;&lt;ol data-end=&quot;2384&quot; data-start=&quot;381&quot;&gt;&lt;li data-end=&quot;1469&quot; data-start=&quot;381&quot;&gt;&lt;p data-end=&quot;409&quot; data-start=&quot;384&quot;&gt;&lt;strong data-end=&quot;408&quot; data-start=&quot;384&quot;&gt;Database per Service&lt;/strong&gt;:&lt;/p&gt;&lt;ul data-end=&quot;1469&quot; data-start=&quot;413&quot;&gt;&lt;li data-end=&quot;670&quot; data-start=&quot;413&quot;&gt;&lt;strong data-end=&quot;427&quot; data-start=&quot;415&quot;&gt;Açıklama&lt;/strong&gt;: Her mikro servis, kendi veritabanını kullanır. Bu, mikro servisin bağımsız çalışmasını ve kendi veri modelini yönetmesini sağlar. Her mikro servisin veri tabanı türü farklı olabilir (örneğin, bir mikro servis SQL, diğeri NoSQL kullanabilir).&lt;/li&gt;&lt;li data-end=&quot;1062&quot; data-start=&quot;674&quot;&gt;&lt;strong data-end=&quot;691&quot; data-start=&quot;676&quot;&gt;Avantajları&lt;/strong&gt;:&lt;ul data-end=&quot;1062&quot; data-start=&quot;698&quot;&gt;&lt;li data-end=&quot;836&quot; data-start=&quot;698&quot;&gt;&lt;strong data-end=&quot;715&quot; data-start=&quot;700&quot;&gt;Bağımsızlık&lt;/strong&gt;: Mikro servisler birbirinin veritabanını etkileyemez, bu da servislerin bağımsız gelişimini ve dağıtımını kolaylaştırır.&lt;/li&gt;&lt;li data-end=&quot;934&quot; data-start=&quot;842&quot;&gt;&lt;strong data-end=&quot;856&quot; data-start=&quot;844&quot;&gt;Esneklik&lt;/strong&gt;: Her mikro servis, kendi gereksinimlerine uygun veri tabanı türünü seçebilir.&lt;/li&gt;&lt;li data-end=&quot;1062&quot; data-start=&quot;940&quot;&gt;&lt;strong data-end=&quot;963&quot; data-start=&quot;942&quot;&gt;Ölçeklenebilirlik&lt;/strong&gt;: Her mikro servis kendi veritabanına sahip olduğunda, sistemin ölçeklenmesi daha verimli olabilir.&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li data-end=&quot;1469&quot; data-start=&quot;1066&quot;&gt;&lt;strong data-end=&quot;1082&quot; data-start=&quot;1068&quot;&gt;Zorlukları&lt;/strong&gt;:&lt;ul data-end=&quot;1469&quot; data-start=&quot;1089&quot;&gt;&lt;li data-end=&quot;1278&quot; data-start=&quot;1089&quot;&gt;&lt;strong data-end=&quot;1111&quot; data-start=&quot;1091&quot;&gt;Veri Tutarlılığı&lt;/strong&gt;: Dağıtık veritabanları nedeniyle veri tutarlılığını sağlamak karmaşık olabilir. Bunun için &lt;strong data-end=&quot;1227&quot; data-start=&quot;1203&quot;&gt;eventual consistency&lt;/strong&gt; ve &lt;strong data-end=&quot;1247&quot; data-start=&quot;1231&quot;&gt;saga pattern&lt;/strong&gt; gibi teknikler kullanılabilir.&lt;/li&gt;&lt;li data-end=&quot;1469&quot; data-start=&quot;1284&quot;&gt;&lt;strong data-end=&quot;1317&quot; data-start=&quot;1286&quot;&gt;Veri Sorgulama Karmaşıklığı&lt;/strong&gt;: Mikro servisler arası veri sorgulama karmaşık hale gelebilir. &lt;strong data-end=&quot;1396&quot; data-start=&quot;1381&quot;&gt;API Gateway&lt;/strong&gt; ve &lt;strong data-end=&quot;1408&quot; data-start=&quot;1400&quot;&gt;CQRS&lt;/strong&gt; gibi desenler, bu karmaşıklığı yönetmek için kullanılabilir.&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li data-end=&quot;2384&quot; data-start=&quot;1471&quot;&gt;&lt;p data-end=&quot;1518&quot; data-start=&quot;1474&quot;&gt;&lt;strong data-end=&quot;1517&quot; data-start=&quot;1474&quot;&gt;Shared Database (Paylaşılan Veritabanı)&lt;/strong&gt;:&lt;/p&gt;&lt;ul data-end=&quot;2384&quot; data-start=&quot;1522&quot;&gt;&lt;li data-end=&quot;1692&quot; data-start=&quot;1522&quot;&gt;&lt;strong data-end=&quot;1536&quot; data-start=&quot;1524&quot;&gt;Açıklama&lt;/strong&gt;: Tüm mikro servisler, tek bir veritabanını paylaşır. Bu, daha geleneksel bir yaklaşım olup, mikro servislerin ortak bir veritabanına erişmesine izin verir.&lt;/li&gt;&lt;li data-end=&quot;1915&quot; data-start=&quot;1696&quot;&gt;&lt;strong data-end=&quot;1713&quot; data-start=&quot;1698&quot;&gt;Avantajları&lt;/strong&gt;:&lt;ul data-end=&quot;1915&quot; data-start=&quot;1720&quot;&gt;&lt;li data-end=&quot;1822&quot; data-start=&quot;1720&quot;&gt;&lt;strong data-end=&quot;1742&quot; data-start=&quot;1722&quot;&gt;Veri Tutarlılığı&lt;/strong&gt;: Tek bir veritabanı kullanıldığından, veri tutarlılığı daha kolay sağlanabilir.&lt;/li&gt;&lt;li data-end=&quot;1915&quot; data-start=&quot;1828&quot;&gt;&lt;strong data-end=&quot;1857&quot; data-start=&quot;1830&quot;&gt;Daha Basit Veri Erişimi&lt;/strong&gt;: Mikro servisler arasındaki veri paylaşımı daha basittir.&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li data-end=&quot;2384&quot; data-start=&quot;1919&quot;&gt;&lt;strong data-end=&quot;1935&quot; data-start=&quot;1921&quot;&gt;Zorlukları&lt;/strong&gt;:&lt;ul data-end=&quot;2384&quot; data-start=&quot;1942&quot;&gt;&lt;li data-end=&quot;2110&quot; data-start=&quot;1942&quot;&gt;&lt;strong data-end=&quot;1965&quot; data-start=&quot;1944&quot;&gt;Bağımsızlık Kaybı&lt;/strong&gt;: Mikro servislerin bağımsızlığı azalır, çünkü tüm servisler aynı veritabanını paylaşır ve bu, servislerin birbirini etkilemesine neden olabilir.&lt;/li&gt;&lt;li data-end=&quot;2254&quot; data-start=&quot;2116&quot;&gt;&lt;strong data-end=&quot;2149&quot; data-start=&quot;2118&quot;&gt;Ölçeklenebilirlik Sorunları&lt;/strong&gt;: Tek bir veritabanı, çok fazla sorgu ve yükle karşılaşabilir, bu da performans sorunlarına yol açabilir.&lt;/li&gt;&lt;li data-end=&quot;2384&quot; data-start=&quot;2260&quot;&gt;&lt;strong data-end=&quot;2300&quot; data-start=&quot;2262&quot;&gt;Geliştirme ve Dağıtım Karmaşıklığı&lt;/strong&gt;: Veritabanı şemalarının ve yapılarının güncellenmesi, tüm servisleri etkileyebilir.&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ol&gt;&lt;h3 data-end=&quot;2434&quot; data-start=&quot;2386&quot;&gt;&lt;strong data-end=&quot;2433&quot; data-start=&quot;2390&quot;&gt;En Yaygın Kullanılan Veritabanı Türleri&lt;/strong&gt;:&lt;/h3&gt;&lt;ul data-end=&quot;3439&quot; data-start=&quot;2435&quot;&gt;&lt;li data-end=&quot;2716&quot; data-start=&quot;2435&quot;&gt;&lt;p data-end=&quot;2716&quot; data-start=&quot;2437&quot;&gt;&lt;strong data-end=&quot;2467&quot; data-start=&quot;2437&quot;&gt;Relational (SQL) Databases&lt;/strong&gt;: Mikro servislerde &lt;strong data-end=&quot;2501&quot; data-start=&quot;2487&quot;&gt;PostgreSQL&lt;/strong&gt;, &lt;strong data-end=&quot;2512&quot; data-start=&quot;2503&quot;&gt;MySQL&lt;/strong&gt;, &lt;strong data-end=&quot;2538&quot; data-start=&quot;2514&quot;&gt;Microsoft SQL Server&lt;/strong&gt; gibi veritabanları kullanılır. Özellikle verilerin ilişkili olduğu ve ACID (Atomicity, Consistency, Isolation, Durability) garantilerinin önemli olduğu durumlarda tercih edilir.&lt;/p&gt;&lt;/li&gt;&lt;li data-end=&quot;3042&quot; data-start=&quot;2720&quot;&gt;&lt;p data-end=&quot;3042&quot; data-start=&quot;2722&quot;&gt;&lt;strong data-end=&quot;2741&quot; data-start=&quot;2722&quot;&gt;NoSQL Databases&lt;/strong&gt;: Mikro servislere özel, &lt;strong data-end=&quot;2777&quot; data-start=&quot;2766&quot;&gt;MongoDB&lt;/strong&gt;, &lt;strong data-end=&quot;2792&quot; data-start=&quot;2779&quot;&gt;Cassandra&lt;/strong&gt;, &lt;strong data-end=&quot;2807&quot; data-start=&quot;2794&quot;&gt;Couchbase&lt;/strong&gt;, &lt;strong data-end=&quot;2818&quot; data-start=&quot;2809&quot;&gt;Redis&lt;/strong&gt; gibi NoSQL veritabanları da yaygın olarak kullanılır. NoSQL veritabanları, esneklik, yatay ölçeklenebilirlik ve hızlı okuma/yazma işlemleri sağladığı için &lt;strong data-end=&quot;2998&quot; data-start=&quot;2974&quot;&gt;eventual consistency&lt;/strong&gt; gerektiren sistemlerde daha uygun olabilir.&lt;/p&gt;&lt;/li&gt;&lt;li data-end=&quot;3265&quot; data-start=&quot;3044&quot;&gt;&lt;p data-end=&quot;3265&quot; data-start=&quot;3046&quot;&gt;&lt;strong data-end=&quot;3062&quot; data-start=&quot;3046&quot;&gt;Event Stores&lt;/strong&gt;: Mikro servis mimarisinde &lt;strong data-end=&quot;3107&quot; data-start=&quot;3089&quot;&gt;Event Sourcing&lt;/strong&gt; kullanılan sistemlerde, &lt;strong data-end=&quot;3147&quot; data-start=&quot;3132&quot;&gt;Event Store&lt;/strong&gt; veritabanları tercih edilebilir. Bu tür veritabanları, tüm sistemdeki olayların kaydedilmesi ve yönetilmesini sağlar.&lt;/p&gt;&lt;/li&gt;&lt;li data-end=&quot;3439&quot; data-start=&quot;3267&quot;&gt;&lt;p data-end=&quot;3439&quot; data-start=&quot;3269&quot;&gt;&lt;strong data-end=&quot;3294&quot; data-start=&quot;3269&quot;&gt;Time-Series Databases&lt;/strong&gt;: &lt;strong data-end=&quot;3308&quot; data-start=&quot;3296&quot;&gt;InfluxDB&lt;/strong&gt; gibi zaman serisi veritabanları, özellikle IoT ve veri akışları gibi zaman tabanlı verilerle çalışan mikro servislerde kullanılır.&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h3 data-end=&quot;3455&quot; data-start=&quot;3441&quot;&gt;&lt;strong data-end=&quot;3454&quot; data-start=&quot;3445&quot;&gt;Sonuç&lt;/strong&gt;:&lt;/h3&gt;&lt;p data-end=&quot;3849&quot; data-start=&quot;3456&quot;&gt;En yaygın ve önerilen yaklaşım, &lt;strong data-end=&quot;3542&quot; data-start=&quot;3488&quot;&gt;her mikro servisin kendi veritabanına sahip olması&lt;/strong&gt;dır. Bu, mikro servislerin bağımsızlığını korur ve sistemin esnekliğini, ölçeklenebilirliğini artırır. Ancak, bu yaklaşım veri tutarlılığı ve karmaşık veri sorgulamaları gibi bazı zorluklar getirir. Bu zorlukları aşmak için &lt;strong data-end=&quot;3774&quot; data-start=&quot;3766&quot;&gt;CQRS&lt;/strong&gt;, &lt;strong data-end=&quot;3800&quot; data-start=&quot;3776&quot;&gt;eventual consistency&lt;/strong&gt;, &lt;strong data-end=&quot;3818&quot; data-start=&quot;3802&quot;&gt;saga pattern&lt;/strong&gt; gibi yöntemler kullanılabilir.&lt;/p&gt;&lt;p data-end=&quot;3982&quot; data-is-last-node=&quot;&quot; data-is-only-node=&quot;&quot; data-start=&quot;3851&quot;&gt;Özetle, her mikro servisin kendi veritabanını kullanması, genellikle mikro hizmet mimarisi için en uygun çözüm olarak kabul edilir.&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://mehmetyoldas.blogspot.com/feeds/3060144252035112712/comments/default' title='Kayıt Yorumları'/><link rel='replies' type='text/html' href='http://mehmetyoldas.blogspot.com/2025/03/mikroservis-mimarisi-ve-veritaban.html#comment-form' title='0 Yorum'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5628326400009361051/posts/default/3060144252035112712'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5628326400009361051/posts/default/3060144252035112712'/><link rel='alternate' type='text/html' href='http://mehmetyoldas.blogspot.com/2025/03/mikroservis-mimarisi-ve-veritaban.html' title='Mikroservis Mimarisi ve Veritabanı Yaklaşımları'/><author><name>Mehmet Yoldaş</name><uri>http://www.blogger.com/profile/17372934623166164299</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVw6x10V3awMwQJFzrhYEEvr-YMR-YcaKARcY29nS8Ny67irGfpUKqZ4uvXuwn6LQhPqNtJq5NQ4rkOE0x29vlgd4UNHA9D6B3uo8_D6VU7-5TZyDRRW-W6MAgLjn7DA/s220/profil+Ba%C5%9Fak+Foto%C4%9Fraf%C3%A7%C4%B1l%C4%B1k.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5628326400009361051.post-2747355980544085422</id><published>2025-03-02T14:05:00.001+03:00</published><updated>2025-03-02T14:05:58.755+03:00</updated><title type='text'>Microservice Mimarisinde Database Sharding</title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;strong data-end=&quot;21&quot; data-start=&quot;0&quot;&gt;Database Sharding&lt;/strong&gt; ve &lt;strong data-end=&quot;50&quot; data-start=&quot;25&quot;&gt;Microservice Mimarisi&lt;/strong&gt; birlikte kullanıldığında, büyük ve dağıtık sistemlerde yüksek performans ve ölçeklenebilirlik sağlamak için güçlü bir yaklaşım sunar. Her iki kavram da farklı amaçlar için tasarlanmış olsa da, birlikte kullanıldıklarında birbiriyle uyumlu çalışabilirler.&lt;/p&gt;&lt;h3 data-end=&quot;339&quot; data-start=&quot;307&quot;&gt;&lt;strong data-end=&quot;339&quot; data-start=&quot;311&quot;&gt;Database Sharding Nedir?&lt;/strong&gt;&lt;/h3&gt;&lt;p data-end=&quot;679&quot; data-start=&quot;340&quot;&gt;Database sharding, bir veritabanını &lt;strong data-end=&quot;385&quot; data-start=&quot;376&quot;&gt;bölme&lt;/strong&gt; işlemidir. Bu, büyük bir veritabanını küçük, bağımsız parçalara (shard&#39;lara) ayırarak, veriyi daha verimli şekilde dağıtmak ve yönetmek amacıyla yapılır. Her shard, verilerin belirli bir bölümünü tutar ve bu bölümler genellikle yatay olarak dağılmıştır (örneğin, kullanıcı ID&#39;sine göre bölme).&lt;/p&gt;&lt;p data-end=&quot;721&quot; data-start=&quot;681&quot;&gt;Sharding&#39;in temel avantajları şunlardır:&lt;/p&gt;&lt;ul data-end=&quot;1005&quot; data-start=&quot;722&quot;&gt;&lt;li data-end=&quot;858&quot; data-start=&quot;722&quot;&gt;&lt;strong data-end=&quot;766&quot; data-start=&quot;724&quot;&gt;Yüksek performans ve ölçeklenebilirlik&lt;/strong&gt;: Veritabanı sorguları daha küçük veri kümeleri üzerinde çalıştığı için daha hızlı olabilir.&lt;/li&gt;&lt;li data-end=&quot;1005&quot; data-start=&quot;859&quot;&gt;&lt;strong data-end=&quot;878&quot; data-start=&quot;861&quot;&gt;Veri dağıtımı&lt;/strong&gt;: Veriler farklı sunucularda dağıtıldığı için, yük dengeleme yapılabilir ve sunucu arızalarına karşı dayanıklılık sağlanabilir.&lt;/li&gt;&lt;/ul&gt;&lt;h3 data-end=&quot;1043&quot; data-start=&quot;1007&quot;&gt;&lt;strong data-end=&quot;1043&quot; data-start=&quot;1011&quot;&gt;Microservice Mimarisi Nedir?&lt;/strong&gt;&lt;/h3&gt;&lt;p data-end=&quot;1309&quot; data-start=&quot;1044&quot;&gt;Microservice mimarisi, bir uygulamanın bağımsız olarak geliştirilebilen ve dağıtılabilen küçük, modüler servislerden oluşmasını sağlayan bir yazılım mimarisidir. Her mikro servis belirli bir işlevi yerine getirir ve kendi veri kaynağına (veritabanı) sahip olabilir.&lt;/p&gt;&lt;h3 data-end=&quot;1370&quot; data-start=&quot;1311&quot;&gt;&lt;strong data-end=&quot;1370&quot; data-start=&quot;1315&quot;&gt;Database Sharding ve Microservice Mimarisi İlişkisi&lt;/strong&gt;&lt;/h3&gt;&lt;p data-end=&quot;1791&quot; data-start=&quot;1371&quot;&gt;Microservice mimarisi, her mikro servisin bağımsız çalışmasını gerektirdiği için, &lt;strong data-end=&quot;1507&quot; data-start=&quot;1453&quot;&gt;her mikro servisin kendi veritabanına sahip olması&lt;/strong&gt; yaygın bir yaklaşımdır. Ancak, büyük sistemlerde bir mikro servisin verisi çok büyük hale gelebilir ve bu da performans sorunlarına yol açabilir. Bu durumda &lt;strong data-end=&quot;1686&quot; data-start=&quot;1665&quot;&gt;database sharding&lt;/strong&gt;, veritabanını daha küçük parçalara bölerek veriyi daha verimli bir şekilde yönetmek için kullanılabilir.&lt;/p&gt;&lt;h4 data-end=&quot;1816&quot; data-start=&quot;1793&quot;&gt;&lt;strong data-end=&quot;1816&quot; data-start=&quot;1798&quot;&gt;Nasıl Çalışır?&lt;/strong&gt;&lt;/h4&gt;&lt;ol data-end=&quot;2777&quot; data-start=&quot;1817&quot;&gt;&lt;li data-end=&quot;2145&quot; data-start=&quot;1817&quot;&gt;&lt;p data-end=&quot;2145&quot; data-start=&quot;1820&quot;&gt;&lt;strong data-end=&quot;1837&quot; data-start=&quot;1820&quot;&gt;Veri Dağılımı&lt;/strong&gt;: Microservice mimarisindeki her mikro servis, kendi veritabanına sahip olabilir. Eğer bir mikro servis çok büyük veri tutuyorsa, bu veri &lt;strong data-end=&quot;1994&quot; data-start=&quot;1975&quot;&gt;shard&#39;lanabilir&lt;/strong&gt;. Örneğin, bir kullanıcı mikro servisi, kullanıcı verilerini sharding kullanarak farklı veri parçalarına bölebilir (örneğin, kullanıcı ID&#39;lerine göre).&lt;/p&gt;&lt;/li&gt;&lt;li data-end=&quot;2379&quot; data-start=&quot;2147&quot;&gt;&lt;p data-end=&quot;2379&quot; data-start=&quot;2150&quot;&gt;&lt;strong data-end=&quot;2172&quot; data-start=&quot;2150&quot;&gt;Bağımsız Shard&#39;lar&lt;/strong&gt;: Her mikro servis, veritabanını shard&#39;ladığında, shard&#39;lar yalnızca o mikro servisin sorumluluğunda olur. Bu, diğer mikro servislerin veri erişimini etkilemeden her mikro servisin performansını artırabilir.&lt;/p&gt;&lt;/li&gt;&lt;li data-end=&quot;2777&quot; data-start=&quot;2381&quot;&gt;&lt;p data-end=&quot;2410&quot; data-start=&quot;2384&quot;&gt;&lt;strong data-end=&quot;2409&quot; data-start=&quot;2384&quot;&gt;Sharding Stratejileri&lt;/strong&gt;:&lt;/p&gt;&lt;ul data-end=&quot;2777&quot; data-start=&quot;2414&quot;&gt;&lt;li data-end=&quot;2617&quot; data-start=&quot;2414&quot;&gt;&lt;strong data-end=&quot;2437&quot; data-start=&quot;2416&quot;&gt;Vertical Sharding&lt;/strong&gt;: Veritabanı şeması belirli alanlara göre bölünür. Örneğin, bir mikro servis sadece kullanıcı bilgileriyle ilgilenirken, başka bir mikro servis yalnızca siparişlerle ilgilenebilir.&lt;/li&gt;&lt;li data-end=&quot;2777&quot; data-start=&quot;2621&quot;&gt;&lt;strong data-end=&quot;2646&quot; data-start=&quot;2623&quot;&gt;Horizontal Sharding&lt;/strong&gt;: Veritabanı satırlarına göre bölünür. Örneğin, kullanıcı ID&#39;sine göre kullanıcı verilerini farklı shard&#39;lara yerleştirebilirsiniz.&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ol&gt;&lt;h4 data-end=&quot;2835&quot; data-start=&quot;2779&quot;&gt;&lt;strong data-end=&quot;2834&quot; data-start=&quot;2784&quot;&gt;Sharding&#39;in Microservice Mimarisiyle Faydaları&lt;/strong&gt;:&lt;/h4&gt;&lt;ul data-end=&quot;3415&quot; data-start=&quot;2836&quot;&gt;&lt;li data-end=&quot;3043&quot; data-start=&quot;2836&quot;&gt;&lt;strong data-end=&quot;2859&quot; data-start=&quot;2838&quot;&gt;Ölçeklenebilirlik&lt;/strong&gt;: Veritabanı shard&#39;ları arasında yük dengesi yapılabilir. Mikro servisler kendi veritabanlarını yönettiği için, shard&#39;lar her mikro servisin bağımsız bir şekilde ölçeklenmesini sağlar.&lt;/li&gt;&lt;li data-end=&quot;3252&quot; data-start=&quot;3044&quot;&gt;&lt;strong data-end=&quot;3067&quot; data-start=&quot;3046&quot;&gt;Yüksek Performans&lt;/strong&gt;: Veritabanı sorguları daha küçük parçalara dağıtıldığından, okuma ve yazma işlemleri daha hızlı hale gelir. Bu, özellikle büyük veri setleriyle çalışan mikro servisler için faydalıdır.&lt;/li&gt;&lt;li data-end=&quot;3415&quot; data-start=&quot;3253&quot;&gt;&lt;strong data-end=&quot;3270&quot; data-start=&quot;3255&quot;&gt;Bağımsızlık&lt;/strong&gt;: Her mikro servis kendi shard&#39;ını yönetebileceği için, diğer servislerin veritabanı yapısını etkilemeden güncellenebilir ve optimize edilebilir.&lt;/li&gt;&lt;/ul&gt;&lt;h3 data-end=&quot;3465&quot; data-start=&quot;3417&quot;&gt;&lt;strong data-end=&quot;3464&quot; data-start=&quot;3421&quot;&gt;Zorluklar ve Dikkat Edilmesi Gerekenler&lt;/strong&gt;:&lt;/h3&gt;&lt;ol data-end=&quot;4126&quot; data-start=&quot;3466&quot;&gt;&lt;li data-end=&quot;3705&quot; data-start=&quot;3466&quot;&gt;&lt;p data-end=&quot;3705&quot; data-start=&quot;3469&quot;&gt;&lt;strong data-end=&quot;3489&quot; data-start=&quot;3469&quot;&gt;Veri Tutarlılığı&lt;/strong&gt;: Microservice mimarisinde her servis bağımsız çalıştığından, veri tutarlılığını sağlamak zorlaşabilir. &lt;strong data-end=&quot;3617&quot; data-start=&quot;3593&quot;&gt;Eventual consistency&lt;/strong&gt; gibi teknikler ve &lt;strong data-end=&quot;3652&quot; data-start=&quot;3636&quot;&gt;saga pattern&lt;/strong&gt; gibi yöntemler kullanılarak tutarlılık sağlanabilir.&lt;/p&gt;&lt;/li&gt;&lt;li data-end=&quot;3938&quot; data-start=&quot;3710&quot;&gt;&lt;p data-end=&quot;3938&quot; data-start=&quot;3713&quot;&gt;&lt;strong data-end=&quot;3741&quot; data-start=&quot;3713&quot;&gt;Veri Erişimi ve Sorgular&lt;/strong&gt;: Eğer bir mikro servis verisini birden fazla shard&#39;da tutuyorsa, bu verilere erişim karmaşık hale gelebilir. Mikro servisler arası sorgulama yapılırken, verilerin nerede olduğunu bilmek önemlidir.&lt;/p&gt;&lt;/li&gt;&lt;li data-end=&quot;4126&quot; data-start=&quot;3940&quot;&gt;&lt;p data-end=&quot;4126&quot; data-start=&quot;3943&quot;&gt;&lt;strong data-end=&quot;3967&quot; data-start=&quot;3943&quot;&gt;Yönetim Karmaşıklığı&lt;/strong&gt;: Shard&#39;lama süreci, yönetimi ve bakımı daha karmaşık hale getirebilir. Özellikle shard&#39;lar arasında veri aktarımı, eşzamanlılık ve hata yönetimi zor olabilir.&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;&lt;h3 data-end=&quot;4142&quot; data-start=&quot;4128&quot;&gt;&lt;strong data-end=&quot;4141&quot; data-start=&quot;4132&quot;&gt;Sonuç&lt;/strong&gt;:&lt;/h3&gt;&lt;ul data-end=&quot;4596&quot; data-is-last-node=&quot;&quot; data-is-only-node=&quot;&quot; data-start=&quot;4143&quot;&gt;&lt;li data-end=&quot;4309&quot; data-start=&quot;4143&quot;&gt;&lt;strong data-end=&quot;4166&quot; data-start=&quot;4145&quot;&gt;Database Sharding&lt;/strong&gt;, microservice mimarisiyle birleştiğinde, &lt;strong data-end=&quot;4229&quot; data-start=&quot;4208&quot;&gt;yüksek performans&lt;/strong&gt;, &lt;strong data-end=&quot;4252&quot; data-start=&quot;4231&quot;&gt;ölçeklenebilirlik&lt;/strong&gt; ve &lt;strong data-end=&quot;4271&quot; data-start=&quot;4256&quot;&gt;bağımsızlık&lt;/strong&gt; sağlamak için önemli bir stratejidir.&lt;/li&gt;&lt;li data-end=&quot;4425&quot; data-start=&quot;4310&quot;&gt;Ancak, &lt;strong data-end=&quot;4339&quot; data-start=&quot;4319&quot;&gt;veri tutarlılığı&lt;/strong&gt;, &lt;strong data-end=&quot;4366&quot; data-start=&quot;4341&quot;&gt;karmaşık veri erişimi&lt;/strong&gt; ve &lt;strong data-end=&quot;4381&quot; data-start=&quot;4370&quot;&gt;yönetim&lt;/strong&gt; gibi zorlukları da beraberinde getirebilir.&lt;/li&gt;&lt;li data-end=&quot;4596&quot; data-is-last-node=&quot;&quot; data-start=&quot;4426&quot;&gt;Bu iki yaklaşım birlikte kullanıldığında büyük, dağıtık ve yüksek trafikli sistemlerde oldukça etkili olabilir, fakat doğru yapılandırma ve dikkatli yönetim gerektirir.&lt;/li&gt;&lt;/ul&gt;</content><link rel='replies' type='application/atom+xml' href='http://mehmetyoldas.blogspot.com/feeds/2747355980544085422/comments/default' title='Kayıt Yorumları'/><link rel='replies' type='text/html' href='http://mehmetyoldas.blogspot.com/2025/03/microservice-mimarisinde-database.html#comment-form' title='0 Yorum'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5628326400009361051/posts/default/2747355980544085422'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5628326400009361051/posts/default/2747355980544085422'/><link rel='alternate' type='text/html' href='http://mehmetyoldas.blogspot.com/2025/03/microservice-mimarisinde-database.html' title='Microservice Mimarisinde Database Sharding'/><author><name>Mehmet Yoldaş</name><uri>http://www.blogger.com/profile/17372934623166164299</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVw6x10V3awMwQJFzrhYEEvr-YMR-YcaKARcY29nS8Ny67irGfpUKqZ4uvXuwn6LQhPqNtJq5NQ4rkOE0x29vlgd4UNHA9D6B3uo8_D6VU7-5TZyDRRW-W6MAgLjn7DA/s220/profil+Ba%C5%9Fak+Foto%C4%9Fraf%C3%A7%C4%B1l%C4%B1k.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5628326400009361051.post-3693372475004002650</id><published>2025-03-02T13:34:00.004+03:00</published><updated>2025-03-02T14:03:52.328+03:00</updated><title type='text'>CQRS Best Practices</title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;strong data-end=&quot;89&quot; data-start=&quot;0&quot;&gt;Aynı veri tabanında hem yazma hem okuma yapıldığında CQRS&#39;in faydası sınırlı olabilir&lt;/strong&gt; çünkü CQRS&#39;in asıl faydası, &lt;strong data-end=&quot;179&quot; data-start=&quot;118&quot;&gt;yazma (command) ve okuma (query) işlemlerini ayrı tutarak&lt;/strong&gt; her iki işlemi de optimize edebilme yeteneğinden gelir. Sistemlere veri girişi oldukça sorgulamalar yavaşlar bunu çözmek için veri tabanına gerekli alanlar için indexler eklenir. Bu şekilde&amp;nbsp; Sorgu (query) işlemleri hızlanır fakat&amp;nbsp; Crud (command) işlemleri yavaşlar. Bunun çözümü olarak okuma ve yazma veri tabanlarını tamamen ayırmak mümkün olur. Bir veritabanda okuma yapabilmek için yapılabilecek en iyi indexleme yapılırken ekleme işlemi için oluşacak işlem yavaşlığına bakılmaz. Hatta verileri daha hızlı alabilmek için veriler denormalize şekilde tutulur. Eğer yazma ve okuma veritabanlarını ayırmadıysanız bu paterni kullanmanın asıl gayesini yapmamış olursunuz.&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; Bu nedenle, &lt;strong data-end=&quot;324&quot; data-start=&quot;278&quot;&gt;yazma ve okuma veri tabanlarının ayrılması&lt;/strong&gt;, her iki işlemi optimize etmek için daha &lt;strong data-end=&quot;387&quot; data-start=&quot;366&quot;&gt;optimum bir çözüm&lt;/strong&gt; sağlar. Aynı veri tabanında çalışmak, genellikle &lt;strong data-end=&quot;465&quot; data-start=&quot;437&quot;&gt;çok büyük fayda sağlamaz&lt;/strong&gt; çünkü okuma ve yazma işlemleri arasında performans çakışmaları olabilir. Ayrı veri tabanları, her iki işlemi farklı şekillerde optimize etmeye olanak tanır ve sistemin genel performansını iyileştirir.&lt;/p&gt;&lt;h3 data-end=&quot;269&quot; data-start=&quot;237&quot;&gt;&lt;strong data-end=&quot;269&quot; data-start=&quot;241&quot;&gt;CQRS&#39;in Temel Faydaları:&lt;/strong&gt;&lt;/h3&gt;&lt;ol data-end=&quot;1340&quot; data-start=&quot;270&quot;&gt;&lt;li data-end=&quot;643&quot; data-start=&quot;270&quot;&gt;&lt;p data-end=&quot;643&quot; data-start=&quot;273&quot;&gt;&lt;strong data-end=&quot;301&quot; data-start=&quot;273&quot;&gt;Performans İyileştirmesi&lt;/strong&gt;: Yazma ve okuma işlemlerini ayrı tutarak, her birini özel olarak optimize edebilirsiniz. Yazma veritabanı genellikle tutarlılığı sağlamak için daha karmaşık bir yapıya sahipken, okuma veritabanı daha hızlı ve esnek sorgulamalar için optimize edilir. Eğer aynı veri tabanında hem yazma hem okuma yapılıyorsa, bu optimizasyonu yapmak zorlaşır.&lt;/p&gt;&lt;/li&gt;&lt;li data-end=&quot;1048&quot; data-start=&quot;645&quot;&gt;&lt;p data-end=&quot;1048&quot; data-start=&quot;648&quot;&gt;&lt;strong data-end=&quot;669&quot; data-start=&quot;648&quot;&gt;Ölçeklenebilirlik&lt;/strong&gt;: Yazma ve okuma işlemleri farklı veri tabanlarında yapılırsa, her iki veri tabanını bağımsız olarak ölçeklendirebilirsiniz. Örneğin, okuma işlemleri yoğun olduğunda sadece okuma veritabanını ölçeklendirebilirken, yazma işlemleri için de aynı şekilde yazma veritabanını ölçeklendirebilirsiniz. Aynı veri tabanı kullanıldığında, tüm sistemi aynı anda ölçeklendirmeniz gerekebilir.&lt;/p&gt;&lt;/li&gt;&lt;li data-end=&quot;1340&quot; data-start=&quot;1050&quot;&gt;&lt;p data-end=&quot;1340&quot; data-start=&quot;1053&quot;&gt;&lt;strong data-end=&quot;1082&quot; data-start=&quot;1053&quot;&gt;Bağımsızlık ve Modülerlik&lt;/strong&gt;: CQRS deseni, yazma ve okuma işlemlerini birbirinden bağımsız tutar. Bu, özellikle büyük projelerde, yazma ve okuma mantıklarının farklı ekipler tarafından yönetilmesi gerektiğinde faydalıdır. Aynı veri tabanını kullanırsanız, bu bağımsızlık kısıtlanabilir.&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;&lt;h3 data-end=&quot;1391&quot; data-start=&quot;1342&quot;&gt;&lt;strong data-end=&quot;1391&quot; data-start=&quot;1346&quot;&gt;Ne Zaman Aynı Veri Tabanı Kullanılabilir?&lt;/strong&gt;&lt;/h3&gt;&lt;ul data-end=&quot;1846&quot; data-start=&quot;1392&quot;&gt;&lt;li data-end=&quot;1659&quot; data-start=&quot;1392&quot;&gt;&lt;p data-end=&quot;1659&quot; data-start=&quot;1394&quot;&gt;&lt;strong data-end=&quot;1422&quot; data-start=&quot;1394&quot;&gt;Küçük ve Basit Sistemler&lt;/strong&gt;: Küçük ölçekli sistemlerde veya düşük trafikli uygulamalarda, yazma ve okuma işlemlerinin aynı veri tabanını kullanması genellikle yeterli olabilir. Burada, CQRS&#39;i yalnızca yazılım katmanında uygulayarak, veritabanını paylaşabilirsiniz.&lt;/p&gt;&lt;/li&gt;&lt;li data-end=&quot;1846&quot; data-start=&quot;1663&quot;&gt;&lt;p data-end=&quot;1846&quot; data-start=&quot;1665&quot;&gt;&lt;strong data-end=&quot;1698&quot; data-start=&quot;1665&quot;&gt;Daha Az Trafik ve Karmaşıklık&lt;/strong&gt;: Eğer okuma ve yazma işlemleri çok karmaşık değilse ve sistemde fazla yük yoksa, aynı veri tabanını kullanmak daha basit ve yönetilebilir olabilir.&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h3 data-end=&quot;1862&quot; data-start=&quot;1848&quot;&gt;&lt;strong data-end=&quot;1862&quot; data-start=&quot;1852&quot;&gt;Sonuç:&lt;/strong&gt;&lt;/h3&gt;&lt;p data-end=&quot;2198&quot; data-is-last-node=&quot;&quot; data-is-only-node=&quot;&quot; data-start=&quot;1863&quot;&gt;Eğer &lt;strong data-end=&quot;1928&quot; data-start=&quot;1868&quot;&gt;yazma ve okuma işlemleri aynı veri tabanında yapılıyorsa&lt;/strong&gt;, CQRS&#39;in faydaları sınırlı olabilir, çünkü CQRS&#39;in asıl avantajları, her iki işlemi de optimize edebilme yeteneğinden kaynaklanır. Ancak küçük ve basit sistemlerde aynı veri tabanını kullanmak mümkündür ve bu durumda CQRS&#39;i sadece yazılım katmanında uygulayabilirsiniz.&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://mehmetyoldas.blogspot.com/feeds/3693372475004002650/comments/default' title='Kayıt Yorumları'/><link rel='replies' type='text/html' href='http://mehmetyoldas.blogspot.com/2025/03/cqrs-best-practices-okuma-ve-yazma-veri.html#comment-form' title='0 Yorum'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5628326400009361051/posts/default/3693372475004002650'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5628326400009361051/posts/default/3693372475004002650'/><link rel='alternate' type='text/html' href='http://mehmetyoldas.blogspot.com/2025/03/cqrs-best-practices-okuma-ve-yazma-veri.html' title='CQRS Best Practices'/><author><name>Mehmet Yoldaş</name><uri>http://www.blogger.com/profile/17372934623166164299</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVw6x10V3awMwQJFzrhYEEvr-YMR-YcaKARcY29nS8Ny67irGfpUKqZ4uvXuwn6LQhPqNtJq5NQ4rkOE0x29vlgd4UNHA9D6B3uo8_D6VU7-5TZyDRRW-W6MAgLjn7DA/s220/profil+Ba%C5%9Fak+Foto%C4%9Fraf%C3%A7%C4%B1l%C4%B1k.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5628326400009361051.post-678809614324047556</id><published>2025-03-02T13:30:00.002+03:00</published><updated>2025-03-02T13:32:57.422+03:00</updated><title type='text'>CQRS  Best Practises</title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;strong data-end=&quot;51&quot; data-start=&quot;0&quot;&gt;CQRS (Command Query Responsibility Segregation)&lt;/strong&gt; deseninde yazma ve okuma veri tabanlarının ayrılması &lt;strong data-end=&quot;122&quot; data-start=&quot;105&quot;&gt;şart değildir&lt;/strong&gt;, ancak bu yaklaşım genellikle önerilir çünkü birçok avantaj sağlar. CQRS, yazma ve okuma işlemlerini birbirinden ayırmayı temel alır, ancak bu iki işlemin farklı veri tabanları kullanmasını gerektirmez. Ancak yazma ve okuma işlemlerini farklı veri tabanlarında yapmanın bazı avantajları vardır.&lt;/p&gt;&lt;h3 data-end=&quot;450&quot; data-start=&quot;419&quot;&gt;&lt;strong data-end=&quot;450&quot; data-start=&quot;423&quot;&gt;CQRS&#39;nin Temel Prensibi&lt;/strong&gt;&lt;/h3&gt;&lt;p data-end=&quot;808&quot; data-start=&quot;451&quot;&gt;CQRS deseninde, &lt;strong data-end=&quot;480&quot; data-start=&quot;467&quot;&gt;&quot;command&quot;&lt;/strong&gt; (yazma) işlemleri ve &lt;strong data-end=&quot;513&quot; data-start=&quot;502&quot;&gt;&quot;query&quot;&lt;/strong&gt; (okuma) işlemleri farklı yollarla ele alınır. Bu ayrım, daha iyi performans, ölçeklenebilirlik, güvenlik ve yönetilebilirlik sağlamak için yapılır. Yazma işlemleri genellikle karmaşık olabilir ve daha fazla iş mantığı içerirken, okuma işlemleri genellikle daha basittir ve daha hızlı olmalıdır.&lt;/p&gt;&lt;h3 data-end=&quot;875&quot; data-start=&quot;810&quot;&gt;&lt;strong data-end=&quot;875&quot; data-start=&quot;814&quot;&gt;Yazma ve Okuma Veri Tabanlarının Ayrılmasının Avantajları&lt;/strong&gt;&lt;/h3&gt;&lt;ol data-end=&quot;2097&quot; data-start=&quot;876&quot;&gt;&lt;li data-end=&quot;1170&quot; data-start=&quot;876&quot;&gt;&lt;p data-end=&quot;910&quot; data-start=&quot;879&quot;&gt;&lt;strong data-end=&quot;909&quot; data-start=&quot;879&quot;&gt;Performans İyileştirmeleri&lt;/strong&gt;:&lt;/p&gt;&lt;ul data-end=&quot;1170&quot; data-start=&quot;914&quot;&gt;&lt;li data-end=&quot;1166&quot; data-start=&quot;914&quot;&gt;Okuma ve yazma işlemleri için optimize edilmiş veri tabanları kullanmak mümkündür. Yazma veritabanı, işlemleri hızlı ve tutarlı bir şekilde kaydedebilecek şekilde tasarlanırken, okuma veritabanı, yüksek performanslı sorgular için optimize edilebilir.&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li data-end=&quot;1498&quot; data-start=&quot;1171&quot;&gt;&lt;p data-end=&quot;1196&quot; data-start=&quot;1174&quot;&gt;&lt;strong data-end=&quot;1195&quot; data-start=&quot;1174&quot;&gt;Ölçeklenebilirlik&lt;/strong&gt;:&lt;/p&gt;&lt;ul data-end=&quot;1498&quot; data-start=&quot;1200&quot;&gt;&lt;li data-end=&quot;1498&quot; data-start=&quot;1200&quot;&gt;Okuma ve yazma işlemleri farklı veri tabanlarında çalıştığı için, her iki veri tabanı ayrı ayrı ölçeklendirilebilir. Yazma veritabanı, genellikle daha fazla işlem ve veri saklama gereksinimi duyarken, okuma veritabanı sorgu işlemleri üzerinde yoğunlaşır ve farklı bir şekilde ölçeklendirilebilir.&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li data-end=&quot;1817&quot; data-start=&quot;1500&quot;&gt;&lt;p data-end=&quot;1544&quot; data-start=&quot;1503&quot;&gt;&lt;strong data-end=&quot;1543&quot; data-start=&quot;1503&quot;&gt;Tutarlılık ve Yüksek Erişilebilirlik&lt;/strong&gt;:&lt;/p&gt;&lt;ul data-end=&quot;1817&quot; data-start=&quot;1548&quot;&gt;&lt;li data-end=&quot;1817&quot; data-start=&quot;1548&quot;&gt;&lt;strong data-end=&quot;1574&quot; data-start=&quot;1550&quot;&gt;Eventual Consistency&lt;/strong&gt; modelini kullanarak, yazma ve okuma veri tabanları arasında tutarlılık sağlanabilir. Bu, özellikle büyük ve dağıtık sistemlerde faydalıdır. Veritabanı replikasyonu veya asenkron veri iletimi kullanılarak, okuma veri tabanı güncel tutulabilir.&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li data-end=&quot;2097&quot; data-start=&quot;1819&quot;&gt;&lt;p data-end=&quot;1848&quot; data-start=&quot;1822&quot;&gt;&lt;strong data-end=&quot;1847&quot; data-start=&quot;1822&quot;&gt;Farklı Veri Modelleri&lt;/strong&gt;:&lt;/p&gt;&lt;ul data-end=&quot;2097&quot; data-start=&quot;1852&quot;&gt;&lt;li data-end=&quot;2097&quot; data-start=&quot;1852&quot;&gt;Yazma ve okuma veri tabanlarında farklı veri modelleri kullanılabilir. Yazma veri tabanı, verileri normalize ederken okuma veri tabanı &lt;strong data-end=&quot;2004&quot; data-start=&quot;1989&quot;&gt;denormalize&lt;/strong&gt; edilmiş verilerle çalışabilir. Bu, okuma işlemlerinin daha hızlı ve verimli olmasını sağlar.&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ol&gt;&lt;h3 data-end=&quot;2175&quot; data-start=&quot;2099&quot;&gt;&lt;strong data-end=&quot;2175&quot; data-start=&quot;2103&quot;&gt;Yazma ve Okuma Veri Tabanlarını Aynı Tutmanın Mümkün Olduğu Durumlar&lt;/strong&gt;&lt;/h3&gt;&lt;ul data-end=&quot;2665&quot; data-start=&quot;2176&quot;&gt;&lt;li data-end=&quot;2449&quot; data-start=&quot;2176&quot;&gt;&lt;p data-end=&quot;2449&quot; data-start=&quot;2178&quot;&gt;&lt;strong data-end=&quot;2197&quot; data-start=&quot;2178&quot;&gt;Basit Sistemler&lt;/strong&gt;: Küçük ve basit sistemlerde, yazma ve okuma işlemlerinin aynı veri tabanını kullanması genellikle yeterlidir. Bu durumda, okuma ve yazma arasındaki ayrım yalnızca yazılım katmanında yapılabilir, veri tabanı tasarımı açısından bir ayrım gerekmeyebilir.&lt;/p&gt;&lt;/li&gt;&lt;li data-end=&quot;2665&quot; data-start=&quot;2453&quot;&gt;&lt;p data-end=&quot;2665&quot; data-start=&quot;2455&quot;&gt;&lt;strong data-end=&quot;2489&quot; data-start=&quot;2455&quot;&gt;Veri Küçüklüğü ve Düşük Trafik&lt;/strong&gt;: Eğer sistemde veri büyüklüğü ve sorgu hacmi düşükse, tek bir veri tabanı kullanmak yeterli olabilir. Bu durumda, okuma ve yazma işlemleri üzerinde çok fazla yük olmayacaktır.&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h3 data-end=&quot;2680&quot; data-start=&quot;2667&quot;&gt;&lt;strong data-end=&quot;2680&quot; data-start=&quot;2671&quot;&gt;Sonuç&lt;/strong&gt;&lt;/h3&gt;&lt;ul data-end=&quot;3043&quot; data-start=&quot;2681&quot;&gt;&lt;li data-end=&quot;2892&quot; data-start=&quot;2681&quot;&gt;&lt;strong data-end=&quot;2729&quot; data-start=&quot;2683&quot;&gt;Yazma ve okuma veri tabanlarının ayrılması&lt;/strong&gt; CQRS deseninde &lt;strong data-end=&quot;2765&quot; data-start=&quot;2745&quot;&gt;zorunlu değildir&lt;/strong&gt;, ancak büyük ve karmaşık sistemlerde &lt;strong data-end=&quot;2817&quot; data-start=&quot;2803&quot;&gt;performans&lt;/strong&gt;, &lt;strong data-end=&quot;2840&quot; data-start=&quot;2819&quot;&gt;ölçeklenebilirlik&lt;/strong&gt; ve &lt;strong data-end=&quot;2862&quot; data-start=&quot;2844&quot;&gt;veri modelleme&lt;/strong&gt; açısından avantajlı olabilir.&lt;/li&gt;&lt;li data-end=&quot;3040&quot; data-start=&quot;2893&quot;&gt;Küçük ve basit sistemlerde aynı veri tabanı kullanılabilir ve CQRS deseninin mantığı, yazılım katmanında yeterince iyi bir şekilde uygulanabilir.&lt;/li&gt;&lt;/ul&gt;&lt;p data-end=&quot;3258&quot; data-is-last-node=&quot;&quot; data-is-only-node=&quot;&quot; data-start=&quot;3044&quot;&gt;Bu nedenle, &lt;strong data-end=&quot;3071&quot; data-start=&quot;3056&quot;&gt;CQRS deseni&lt;/strong&gt; yalnızca yazma ve okuma işlemlerini ayırmayı gerektirirken, veri tabanlarını ayırmak, genellikle bu desenin sağladığı faydalardan tam anlamıyla yararlanmak için önerilen bir yaklaşımdır.&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://mehmetyoldas.blogspot.com/feeds/678809614324047556/comments/default' title='Kayıt Yorumları'/><link rel='replies' type='text/html' href='http://mehmetyoldas.blogspot.com/2025/03/cqrs-best-practises.html#comment-form' title='0 Yorum'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5628326400009361051/posts/default/678809614324047556'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5628326400009361051/posts/default/678809614324047556'/><link rel='alternate' type='text/html' href='http://mehmetyoldas.blogspot.com/2025/03/cqrs-best-practises.html' title='CQRS  Best Practises'/><author><name>Mehmet Yoldaş</name><uri>http://www.blogger.com/profile/17372934623166164299</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVw6x10V3awMwQJFzrhYEEvr-YMR-YcaKARcY29nS8Ny67irGfpUKqZ4uvXuwn6LQhPqNtJq5NQ4rkOE0x29vlgd4UNHA9D6B3uo8_D6VU7-5TZyDRRW-W6MAgLjn7DA/s220/profil+Ba%C5%9Fak+Foto%C4%9Fraf%C3%A7%C4%B1l%C4%B1k.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5628326400009361051.post-2882694350872316854</id><published>2025-03-02T13:24:00.002+03:00</published><updated>2025-03-02T13:24:43.361+03:00</updated><title type='text'>Microservice Mimaride Veri Senkronizasyonu </title><content type='html'>&lt;p&gt;&amp;nbsp;Veri senkronizasyonu, özellikle &lt;strong data-end=&quot;40&quot; data-start=&quot;32&quot;&gt;CQRS&lt;/strong&gt; (Command Query Responsibility Segregation) ve &lt;strong data-end=&quot;104&quot; data-start=&quot;87&quot;&gt;microservices&lt;/strong&gt; mimarilerinde, yazma ve okuma veri tabanları arasındaki tutarlılığı sağlamak için kritik bir konudur. Yazma ve okuma veri tabanlarının ayrılması, sistemin verimliliğini artırırken, verilerin tutarlılığının yönetilmesi ve güncellenmesi önemli bir zorluk oluşturabilir.&lt;/p&gt;&lt;h3 data-end=&quot;409&quot; data-start=&quot;374&quot;&gt;&lt;strong data-end=&quot;409&quot; data-start=&quot;378&quot;&gt;Veri Senkronizasyonu Nedir?&lt;/strong&gt;&lt;/h3&gt;&lt;p data-end=&quot;680&quot; data-start=&quot;410&quot;&gt;Veri senkronizasyonu, bir veri kaynağındaki (yazma veri tabanı) verilerin, başka bir veri kaynağına (okuma veri tabanı) doğru ve tutarlı bir şekilde aktarılmasını ifade eder. Bu süreç, genellikle veritabanları arasındaki veri farklılıklarını ortadan kaldırmayı hedefler.&lt;/p&gt;&lt;p data-end=&quot;1071&quot; data-start=&quot;682&quot;&gt;&lt;strong data-end=&quot;697&quot; data-start=&quot;682&quot;&gt;CQRS deseni&lt;/strong&gt; uygulandığında, okuma ve yazma işlemleri farklı veri tabanlarında yapılır. Yazma veritabanındaki değişiklikler (yeni veriler, güncellenmiş veriler, silinen veriler) okuma veritabanına aktarılmalıdır. Ancak bu süreç, anında gerçekleşmeyebilir ve zamanla gerçekleşebilir. &lt;strong data-end=&quot;992&quot; data-start=&quot;968&quot;&gt;Eventual Consistency&lt;/strong&gt; (sonunda tutarlılık) ve &lt;strong data-end=&quot;1044&quot; data-start=&quot;1017&quot;&gt;Asenkron Senkronizasyon&lt;/strong&gt; gibi yöntemler kullanılır.&lt;/p&gt;&lt;h3 data-end=&quot;1112&quot; data-start=&quot;1073&quot;&gt;&lt;strong data-end=&quot;1112&quot; data-start=&quot;1077&quot;&gt;Veri Senkronizasyonu Yöntemleri&lt;/strong&gt;&lt;/h3&gt;&lt;ol data-end=&quot;1162&quot; data-start=&quot;1114&quot;&gt;&lt;li data-end=&quot;1162&quot; data-start=&quot;1114&quot;&gt;&lt;strong data-end=&quot;1162&quot; data-start=&quot;1117&quot;&gt;Eventual Consistency (Sonunda Tutarlılık)&lt;/strong&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p data-end=&quot;1352&quot; data-start=&quot;1164&quot;&gt;Eventual consistency, yazma ve okuma veri tabanları arasında &lt;strong data-end=&quot;1246&quot; data-start=&quot;1225&quot;&gt;anında tutarlılık&lt;/strong&gt; sağlamaz. Bunun yerine, veri güncellemeleri bir süre sonra her iki veri tabanında da tutarlı hale gelir.&lt;/p&gt;&lt;ul data-end=&quot;1743&quot; data-start=&quot;1354&quot;&gt;&lt;li data-end=&quot;1533&quot; data-start=&quot;1354&quot;&gt;&lt;strong data-end=&quot;1372&quot; data-start=&quot;1356&quot;&gt;Yazma işlemi&lt;/strong&gt; gerçekleştiğinde, bu işlemle ilgili bir &lt;strong data-end=&quot;1429&quot; data-start=&quot;1413&quot;&gt;olay (event)&lt;/strong&gt; tetiklenir. Bu olay, yazma veri tabanına kaydedilir ve okuma veri tabanını güncellemek için kullanılır.&lt;/li&gt;&lt;li data-end=&quot;1740&quot; data-start=&quot;1534&quot;&gt;Bu olay, &lt;strong data-end=&quot;1569&quot; data-start=&quot;1545&quot;&gt;asenkron bir şekilde&lt;/strong&gt; okuma veri tabanına aktarılır. Yani, okuma veri tabanındaki güncelleme işlemine hemen başlamaz, ancak belirli bir süre sonra okuma veritabanı bu veriyi alır ve günceller.&lt;/li&gt;&lt;/ul&gt;&lt;p data-end=&quot;1754&quot; data-start=&quot;1744&quot;&gt;&lt;strong data-end=&quot;1753&quot; data-start=&quot;1744&quot;&gt;Örnek&lt;/strong&gt;:&lt;/p&gt;&lt;ul data-end=&quot;2101&quot; data-start=&quot;1755&quot;&gt;&lt;li data-end=&quot;2101&quot; data-start=&quot;1755&quot;&gt;&lt;strong data-end=&quot;1778&quot; data-start=&quot;1757&quot;&gt;Sipariş oluşturma&lt;/strong&gt;: Bir kullanıcı sipariş verir ve sipariş yazma veritabanına kaydedilir. Bunun ardından bir &lt;strong data-end=&quot;1894&quot; data-start=&quot;1869&quot;&gt;&quot;sipariş oluşturulma&quot;&lt;/strong&gt; olayı tetiklenir. Okuma mikroservisi bu olayı dinler ve sipariş verisini okuma veri tabanına aktarır. Ancak bu süreç hemen gerçekleşmez; yazma ve okuma veri tabanları arasındaki tutarlılık zamanla sağlanır.&lt;/li&gt;&lt;/ul&gt;&lt;h3 data-end=&quot;2179&quot; data-start=&quot;2103&quot;&gt;&lt;strong data-end=&quot;2179&quot; data-start=&quot;2107&quot;&gt;Veri Senkronizasyonu için Kullanılabilecek Yöntemler ve Teknolojiler&lt;/strong&gt;&lt;/h3&gt;&lt;ol data-end=&quot;2235&quot; data-start=&quot;2181&quot;&gt;&lt;li data-end=&quot;2235&quot; data-start=&quot;2181&quot;&gt;&lt;strong data-end=&quot;2235&quot; data-start=&quot;2184&quot;&gt;Event-Driven Architecture (Olay Tabanlı Mimari)&lt;/strong&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p data-end=&quot;2462&quot; data-start=&quot;2237&quot;&gt;Event-driven mimaride, yazma işlemi bir &lt;strong data-end=&quot;2285&quot; data-start=&quot;2277&quot;&gt;olay&lt;/strong&gt; (event) oluşturur ve bu olay okuma veri tabanını güncelleyen mikroservislere iletilir. Bu mikroservisler, olayları dinler ve okuma veri tabanını asenkron bir şekilde günceller.&lt;/p&gt;&lt;ul data-end=&quot;2728&quot; data-start=&quot;2464&quot;&gt;&lt;li data-end=&quot;2627&quot; data-start=&quot;2464&quot;&gt;&lt;strong data-end=&quot;2485&quot; data-start=&quot;2466&quot;&gt;Event Publisher&lt;/strong&gt;: Yazma veri tabanına veri ekleyen sistem, bir olay tetikler. Bu olay, genellikle bir &lt;strong data-end=&quot;2589&quot; data-start=&quot;2571&quot;&gt;message broker&lt;/strong&gt; (mesaj aracısı) kullanılarak yayılır.&lt;/li&gt;&lt;li data-end=&quot;2728&quot; data-start=&quot;2628&quot;&gt;&lt;strong data-end=&quot;2648&quot; data-start=&quot;2630&quot;&gt;Event Consumer&lt;/strong&gt;: Okuma veri tabanı, bu olayı dinleyen bir mikroservis aracılığıyla güncellenir.&lt;/li&gt;&lt;/ul&gt;&lt;p data-end=&quot;2747&quot; data-start=&quot;2730&quot;&gt;&lt;strong data-end=&quot;2746&quot; data-start=&quot;2730&quot;&gt;Teknolojiler&lt;/strong&gt;:&lt;/p&gt;&lt;ul data-end=&quot;3019&quot; data-start=&quot;2748&quot;&gt;&lt;li data-end=&quot;2909&quot; data-start=&quot;2748&quot;&gt;&lt;strong data-end=&quot;2759&quot; data-start=&quot;2750&quot;&gt;Kafka&lt;/strong&gt;: Yazma mikroservisi, Kafka üzerinden &quot;sipariş oluşturuldu&quot; gibi bir olay gönderir. Okuma mikroservisi bu olayı alır ve okuma veri tabanını günceller.&lt;/li&gt;&lt;li data-end=&quot;3019&quot; data-start=&quot;2910&quot;&gt;&lt;strong data-end=&quot;2924&quot; data-start=&quot;2912&quot;&gt;RabbitMQ&lt;/strong&gt;: Kafka&#39;ya benzer olarak, RabbitMQ da mesaj kuyruğu kullanarak olayları asenkron olarak iletir.&lt;/li&gt;&lt;/ul&gt;&lt;p data-end=&quot;3036&quot; data-start=&quot;3021&quot;&gt;&lt;strong data-end=&quot;3035&quot; data-start=&quot;3021&quot;&gt;Örnek Akış&lt;/strong&gt;:&lt;/p&gt;&lt;ol data-end=&quot;3290&quot; data-start=&quot;3039&quot;&gt;&lt;li data-end=&quot;3081&quot; data-start=&quot;3039&quot;&gt;&lt;p data-end=&quot;3081&quot; data-start=&quot;3042&quot;&gt;Sipariş yazma veri tabanına kaydedilir.&lt;/p&gt;&lt;/li&gt;&lt;li data-end=&quot;3173&quot; data-start=&quot;3084&quot;&gt;&lt;p data-end=&quot;3173&quot; data-start=&quot;3087&quot;&gt;&quot;Sipariş oluşturuldu&quot; olayı, RabbitMQ veya Kafka gibi bir message broker&#39;a gönderilir.&lt;/p&gt;&lt;/li&gt;&lt;li data-end=&quot;3259&quot; data-start=&quot;3176&quot;&gt;&lt;p data-end=&quot;3259&quot; data-start=&quot;3179&quot;&gt;Okuma veri tabanı, bu olayı dinler ve veritabanına yeni sipariş bilgisini ekler.&lt;/p&gt;&lt;/li&gt;&lt;li data-end=&quot;3290&quot; data-start=&quot;3261&quot;&gt;&lt;p data-end=&quot;3290&quot; data-start=&quot;3264&quot;&gt;&lt;strong data-end=&quot;3290&quot; data-start=&quot;3264&quot;&gt;CQRS ve Event Sourcing&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p data-end=&quot;3484&quot; data-start=&quot;3292&quot;&gt;Event Sourcing, her değişikliği bir &lt;strong data-end=&quot;3344&quot; data-start=&quot;3328&quot;&gt;olay (event)&lt;/strong&gt; olarak kaydeder. Yazma veritabanına yapılan her işlem bir olaydır ve bu olay, okuma veri tabanına iletilerek veri senkronizasyonu sağlanır.&lt;/p&gt;&lt;ul data-end=&quot;3635&quot; data-start=&quot;3486&quot;&gt;&lt;li data-end=&quot;3546&quot; data-start=&quot;3486&quot;&gt;&lt;strong data-end=&quot;3509&quot; data-start=&quot;3488&quot;&gt;Yazma Veri Tabanı&lt;/strong&gt;: Veriler bir olay olarak kaydedilir.&lt;/li&gt;&lt;li data-end=&quot;3635&quot; data-start=&quot;3547&quot;&gt;&lt;strong data-end=&quot;3570&quot; data-start=&quot;3549&quot;&gt;Okuma Veri Tabanı&lt;/strong&gt;: Bu olaylar dinlenir ve okuma veri tabanı buna göre güncellenir.&lt;/li&gt;&lt;/ul&gt;&lt;p data-end=&quot;3665&quot; data-start=&quot;3637&quot;&gt;&lt;strong data-end=&quot;3664&quot; data-start=&quot;3637&quot;&gt;Event Sourcing Özelliği&lt;/strong&gt;:&lt;/p&gt;&lt;ul data-end=&quot;3778&quot; data-start=&quot;3666&quot;&gt;&lt;li data-end=&quot;3775&quot; data-start=&quot;3666&quot;&gt;Her işlem bir &lt;strong data-end=&quot;3691&quot; data-start=&quot;3682&quot;&gt;event&lt;/strong&gt; olarak kaydedilir ve okuma veritabanı bu olayları işleyerek güncel verilere ulaşır.&lt;/li&gt;&lt;/ul&gt;&lt;p data-end=&quot;3789&quot; data-start=&quot;3779&quot;&gt;&lt;strong data-end=&quot;3788&quot; data-start=&quot;3779&quot;&gt;Örnek&lt;/strong&gt;:&lt;/p&gt;&lt;ol data-end=&quot;4043&quot; data-start=&quot;3792&quot;&gt;&lt;li data-end=&quot;3878&quot; data-start=&quot;3792&quot;&gt;&lt;p data-end=&quot;3878&quot; data-start=&quot;3795&quot;&gt;Sipariş yazma veritabanına kaydedildiğinde, &quot;sipariş oluşturulma&quot; olayı tetiklenir.&lt;/p&gt;&lt;/li&gt;&lt;li data-end=&quot;4005&quot; data-start=&quot;3881&quot;&gt;&lt;p data-end=&quot;4005&quot; data-start=&quot;3884&quot;&gt;Event sourcing kullanarak, bu olay hem yazma veritabanında hem de okuma veri tabanında biriken olaylar sayesinde işlenir.&lt;/p&gt;&lt;/li&gt;&lt;li data-end=&quot;4043&quot; data-start=&quot;4007&quot;&gt;&lt;p data-end=&quot;4043&quot; data-start=&quot;4010&quot;&gt;&lt;strong data-end=&quot;4043&quot; data-start=&quot;4010&quot;&gt;Polling (Periyodik Sorgulama)&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p data-end=&quot;4268&quot; data-start=&quot;4045&quot;&gt;Polling yöntemi, okuma mikroservisinin belirli aralıklarla yazma veri tabanını sorgulamasıdır. Yazma veritabanında herhangi bir değişiklik olup olmadığını kontrol eder ve eğer değişiklik varsa okuma veri tabanını günceller.&lt;/p&gt;&lt;ul data-end=&quot;4507&quot; data-start=&quot;4270&quot;&gt;&lt;li data-end=&quot;4507&quot; data-start=&quot;4270&quot;&gt;&lt;strong data-end=&quot;4283&quot; data-start=&quot;4272&quot;&gt;Adımlar&lt;/strong&gt;:&lt;ol data-end=&quot;4507&quot; data-start=&quot;4287&quot;&gt;&lt;li data-end=&quot;4353&quot; data-start=&quot;4287&quot;&gt;Okuma servisi belirli aralıklarla yazma veri tabanını sorgular.&lt;/li&gt;&lt;li data-end=&quot;4456&quot; data-start=&quot;4356&quot;&gt;Yazma veri tabanındaki değişiklikleri (yeni siparişler veya güncellenmiş siparişler) tespit eder.&lt;/li&gt;&lt;li data-end=&quot;4507&quot; data-start=&quot;4459&quot;&gt;Değişiklikler, okuma veri tabanına aktarılır.&lt;/li&gt;&lt;/ol&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p data-end=&quot;4623&quot; data-start=&quot;4509&quot;&gt;&lt;strong data-end=&quot;4516&quot; data-start=&quot;4509&quot;&gt;Not&lt;/strong&gt;: Bu yaklaşım, daha fazla kaynak tüketebilir ve gecikmelere neden olabilir çünkü sürekli sorgulama yapılır.&lt;/p&gt;&lt;ol data-end=&quot;4678&quot; data-start=&quot;4625&quot; start=&quot;4&quot;&gt;&lt;li data-end=&quot;4678&quot; data-start=&quot;4625&quot;&gt;&lt;strong data-end=&quot;4678&quot; data-start=&quot;4628&quot;&gt;Database Replication (Veritabanı Replikasyonu)&lt;/strong&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p data-end=&quot;4928&quot; data-start=&quot;4680&quot;&gt;Bazı durumlarda, yazma veri tabanındaki verilerin okuma veri tabanına &lt;strong data-end=&quot;4766&quot; data-start=&quot;4750&quot;&gt;replikasyonu&lt;/strong&gt; yapılır. Bu, genellikle aynı veri kaynağının iki farklı versiyonunun kullanılmasına dayanır, ancak senkronizasyonun manuel ya da asenkron yapılmasını gerektirir.&lt;/p&gt;&lt;p data-end=&quot;4958&quot; data-start=&quot;4930&quot;&gt;&lt;strong data-end=&quot;4957&quot; data-start=&quot;4930&quot;&gt;Veritabanı Replikasyonu&lt;/strong&gt;:&lt;/p&gt;&lt;ul data-end=&quot;5250&quot; data-start=&quot;4959&quot;&gt;&lt;li data-end=&quot;5090&quot; data-start=&quot;4959&quot;&gt;&lt;strong data-end=&quot;4989&quot; data-start=&quot;4961&quot;&gt;Master-Slave Replication&lt;/strong&gt;: Yazma veri tabanı (master) değişiklik yapar ve bu değişiklikler okuma veri tabanına (slave) yansır.&lt;/li&gt;&lt;li data-end=&quot;5250&quot; data-start=&quot;5091&quot;&gt;&lt;strong data-end=&quot;5117&quot; data-start=&quot;5093&quot;&gt;Asenkron Replikasyon&lt;/strong&gt;: Replikasyon işlemi hemen gerçekleşmez ve yazma veri tabanındaki değişiklikler belirli bir süre sonra okuma veri tabanına aktarılır.&lt;/li&gt;&lt;/ul&gt;&lt;h3 data-end=&quot;5304&quot; data-start=&quot;5252&quot;&gt;&lt;strong data-end=&quot;5304&quot; data-start=&quot;5256&quot;&gt;Veri Senkronizasyonu Zorlukları ve Çözümleri&lt;/strong&gt;&lt;/h3&gt;&lt;ol data-end=&quot;6362&quot; data-start=&quot;5306&quot;&gt;&lt;li data-end=&quot;5720&quot; data-start=&quot;5306&quot;&gt;&lt;p data-end=&quot;5344&quot; data-start=&quot;5309&quot;&gt;&lt;strong data-end=&quot;5343&quot; data-start=&quot;5309&quot;&gt;Veri Tutarlılığı (Consistency)&lt;/strong&gt;:&lt;/p&gt;&lt;ul data-end=&quot;5720&quot; data-start=&quot;5348&quot;&gt;&lt;li data-end=&quot;5480&quot; data-start=&quot;5348&quot;&gt;&lt;strong data-end=&quot;5360&quot; data-start=&quot;5350&quot;&gt;Zorluk&lt;/strong&gt;: Yazma ve okuma veri tabanları arasında anlık tutarlılığı sağlamak zordur, çünkü veri asenkron bir şekilde güncellenir.&lt;/li&gt;&lt;li data-end=&quot;5720&quot; data-start=&quot;5484&quot;&gt;&lt;strong data-end=&quot;5495&quot; data-start=&quot;5486&quot;&gt;Çözüm&lt;/strong&gt;: &lt;strong data-end=&quot;5521&quot; data-start=&quot;5497&quot;&gt;Eventual consistency&lt;/strong&gt; modelini kullanarak, veri zamanla tutarlı hale gelir. Bununla birlikte, tutarlılıkla ilgili riskleri azaltmak için, işlem sırasını takip edebilecek &lt;strong data-end=&quot;5688&quot; data-start=&quot;5670&quot;&gt;event ordering&lt;/strong&gt; (olay sıralaması) sağlanabilir.&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li data-end=&quot;6054&quot; data-start=&quot;5722&quot;&gt;&lt;p data-end=&quot;5740&quot; data-start=&quot;5725&quot;&gt;&lt;strong data-end=&quot;5739&quot; data-start=&quot;5725&quot;&gt;Veri Kaybı&lt;/strong&gt;:&lt;/p&gt;&lt;ul data-end=&quot;6054&quot; data-start=&quot;5744&quot;&gt;&lt;li data-end=&quot;5840&quot; data-start=&quot;5744&quot;&gt;&lt;strong data-end=&quot;5756&quot; data-start=&quot;5746&quot;&gt;Zorluk&lt;/strong&gt;: Event-driven mimarilerde, bir olay kaybolursa okuma veritabanı güncellenmeyebilir.&lt;/li&gt;&lt;li data-end=&quot;6054&quot; data-start=&quot;5844&quot;&gt;&lt;strong data-end=&quot;5855&quot; data-start=&quot;5846&quot;&gt;Çözüm&lt;/strong&gt;: Olay kayıplarını önlemek için &lt;strong data-end=&quot;5905&quot; data-start=&quot;5887&quot;&gt;message broker&lt;/strong&gt; sistemlerinin sağlamlığı sağlanmalı ve olaylar yeniden oynatılabilir olmalıdır. Ayrıca, her olayın kaydedilmesi için &lt;strong data-end=&quot;6038&quot; data-start=&quot;6023&quot;&gt;Event Store&lt;/strong&gt; kullanılabilir.&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li data-end=&quot;6362&quot; data-start=&quot;6056&quot;&gt;&lt;p data-end=&quot;6074&quot; data-start=&quot;6059&quot;&gt;&lt;strong data-end=&quot;6073&quot; data-start=&quot;6059&quot;&gt;Performans&lt;/strong&gt;:&lt;/p&gt;&lt;ul data-end=&quot;6362&quot; data-start=&quot;6078&quot;&gt;&lt;li data-end=&quot;6159&quot; data-start=&quot;6078&quot;&gt;&lt;strong data-end=&quot;6090&quot; data-start=&quot;6080&quot;&gt;Zorluk&lt;/strong&gt;: Veri senkronizasyonu zaman alabilir ve sistemdeki yükü artırabilir.&lt;/li&gt;&lt;li data-end=&quot;6362&quot; data-start=&quot;6163&quot;&gt;&lt;strong data-end=&quot;6174&quot; data-start=&quot;6165&quot;&gt;Çözüm&lt;/strong&gt;: &lt;strong data-end=&quot;6200&quot; data-start=&quot;6176&quot;&gt;Eventual consistency&lt;/strong&gt; ve &lt;strong data-end=&quot;6230&quot; data-start=&quot;6204&quot;&gt;asenkron veri aktarımı&lt;/strong&gt; kullanarak, bu süreci daha verimli hale getirebiliriz. Veritabanı sorgulama sıklığı azaltılabilir ve sadece değişiklikler iletilir.&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ol&gt;&lt;h3 data-end=&quot;6378&quot; data-start=&quot;6364&quot;&gt;&lt;strong data-end=&quot;6377&quot; data-start=&quot;6368&quot;&gt;Sonuç&lt;/strong&gt;:&lt;/h3&gt;&lt;p data-end=&quot;6863&quot; data-is-last-node=&quot;&quot; data-is-only-node=&quot;&quot; data-start=&quot;6379&quot;&gt;Veri senkronizasyonu, özellikle &lt;strong data-end=&quot;6419&quot; data-start=&quot;6411&quot;&gt;CQRS&lt;/strong&gt; deseniyle çalışan mikroservislerde, yazma ve okuma veri tabanları arasındaki tutarlılığı sağlamak için kritik bir bileşendir. Yazma veri tabanındaki değişikliklerin okuma veri tabanına aktarılması, &lt;strong data-end=&quot;6634&quot; data-start=&quot;6618&quot;&gt;event-driven&lt;/strong&gt;, &lt;strong data-end=&quot;6654&quot; data-start=&quot;6636&quot;&gt;event sourcing&lt;/strong&gt; gibi yöntemlerle sağlanır. &lt;strong data-end=&quot;6693&quot; data-start=&quot;6682&quot;&gt;Polling&lt;/strong&gt; ve &lt;strong data-end=&quot;6721&quot; data-start=&quot;6697&quot;&gt;Database Replication&lt;/strong&gt; gibi alternatifler de kullanılabilir. Bu süreç, genellikle &lt;strong data-end=&quot;6805&quot; data-start=&quot;6781&quot;&gt;eventual consistency&lt;/strong&gt; ilkesine dayanır, yani veri tutarlılığı zamanla sağlanır.&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://mehmetyoldas.blogspot.com/feeds/2882694350872316854/comments/default' title='Kayıt Yorumları'/><link rel='replies' type='text/html' href='http://mehmetyoldas.blogspot.com/2025/03/microservice-mimaride-veri.html#comment-form' title='0 Yorum'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5628326400009361051/posts/default/2882694350872316854'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5628326400009361051/posts/default/2882694350872316854'/><link rel='alternate' type='text/html' href='http://mehmetyoldas.blogspot.com/2025/03/microservice-mimaride-veri.html' title='Microservice Mimaride Veri Senkronizasyonu '/><author><name>Mehmet Yoldaş</name><uri>http://www.blogger.com/profile/17372934623166164299</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVw6x10V3awMwQJFzrhYEEvr-YMR-YcaKARcY29nS8Ny67irGfpUKqZ4uvXuwn6LQhPqNtJq5NQ4rkOE0x29vlgd4UNHA9D6B3uo8_D6VU7-5TZyDRRW-W6MAgLjn7DA/s220/profil+Ba%C5%9Fak+Foto%C4%9Fraf%C3%A7%C4%B1l%C4%B1k.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5628326400009361051.post-3883948619753812040</id><published>2025-03-02T13:18:00.003+03:00</published><updated>2025-03-02T13:18:18.869+03:00</updated><title type='text'>CQRS Desenini Kullanarak Basit Bir Senaryo Tasarımı</title><content type='html'>&lt;p&gt;&amp;nbsp;Tabii, basit bir senaryo üzerinden &lt;strong data-end=&quot;43&quot; data-start=&quot;35&quot;&gt;CQRS&lt;/strong&gt; deseninin nasıl çalıştığını ve yazma ile okuma veri tabanlarının nasıl ayrıldığını adım adım açıklayalım.&lt;/p&gt;&lt;h3 data-end=&quot;208&quot; data-start=&quot;151&quot;&gt;&lt;strong data-end=&quot;208&quot; data-start=&quot;155&quot;&gt;Senaryo: E-Ticaret Uygulaması - Sipariş İşlemleri&lt;/strong&gt;&lt;/h3&gt;&lt;p data-end=&quot;503&quot; data-start=&quot;210&quot;&gt;Diyelim ki bir &lt;strong data-end=&quot;250&quot; data-start=&quot;225&quot;&gt;e-ticaret uygulamanız&lt;/strong&gt; var ve burada bir kullanıcı sipariş vermek istediğinde, sipariş bilgileri önce &lt;strong data-end=&quot;360&quot; data-start=&quot;330&quot;&gt;sipariş yazma veritabanına&lt;/strong&gt; kaydedilecek. Ardından bu sipariş bilgileri &lt;strong data-end=&quot;435&quot; data-start=&quot;405&quot;&gt;sipariş okuma veritabanına&lt;/strong&gt; aktarılacak ki kullanıcı daha sonra siparişlerinin durumunu görsün.&lt;/p&gt;&lt;h4 data-end=&quot;522&quot; data-start=&quot;505&quot;&gt;&lt;strong data-end=&quot;521&quot; data-start=&quot;510&quot;&gt;Adımlar&lt;/strong&gt;:&lt;/h4&gt;&lt;h3 data-end=&quot;557&quot; data-start=&quot;524&quot;&gt;1. &lt;strong data-end=&quot;557&quot; data-start=&quot;531&quot;&gt;Yazma (Command) İşlemi&lt;/strong&gt;&lt;/h3&gt;&lt;ul data-end=&quot;1166&quot; data-start=&quot;558&quot;&gt;&lt;li data-end=&quot;1166&quot; data-start=&quot;558&quot;&gt;&lt;strong data-end=&quot;589&quot; data-start=&quot;560&quot;&gt;Kullanıcı Sipariş Veriyor&lt;/strong&gt;:&lt;ul data-end=&quot;846&quot; data-start=&quot;593&quot;&gt;&lt;li data-end=&quot;710&quot; data-start=&quot;593&quot;&gt;Kullanıcı, e-ticaret platformunda bir ürün seçip ödeme yapar. Bu işlem, bir &lt;strong data-end=&quot;689&quot; data-start=&quot;671&quot;&gt;sipariş komutu&lt;/strong&gt; (command) oluşturur.&lt;/li&gt;&lt;li data-end=&quot;843&quot; data-start=&quot;713&quot;&gt;Sipariş oluşturulurken, siparişle ilgili tüm detaylar (ürün adı, fiyat, miktar, teslimat adresi) yazma veri tabanına kaydedilir.&lt;/li&gt;&lt;/ul&gt;&lt;strong data-end=&quot;870&quot; data-start=&quot;849&quot;&gt;Yazma Veri Tabanı&lt;/strong&gt; (normalize edilmiş model):&lt;ul data-end=&quot;1166&quot; data-start=&quot;900&quot;&gt;&lt;li data-end=&quot;1166&quot; data-start=&quot;900&quot;&gt;&lt;code data-end=&quot;914&quot; data-start=&quot;902&quot;&gt;siparisler&lt;/code&gt; tablosu:&lt;table data-end=&quot;1166&quot; data-start=&quot;928&quot;&gt;&lt;thead data-end=&quot;1004&quot; data-start=&quot;928&quot;&gt;&lt;tr data-end=&quot;1004&quot; data-start=&quot;928&quot;&gt;&lt;th data-end=&quot;941&quot; data-start=&quot;928&quot;&gt;siparis_id&lt;/th&gt;&lt;th data-end=&quot;956&quot; data-start=&quot;941&quot;&gt;kullanici_id&lt;/th&gt;&lt;th data-end=&quot;967&quot; data-start=&quot;956&quot;&gt;urun_adı&lt;/th&gt;&lt;th data-end=&quot;976&quot; data-start=&quot;967&quot;&gt;miktar&lt;/th&gt;&lt;th data-end=&quot;984&quot; data-start=&quot;976&quot;&gt;fiyat&lt;/th&gt;&lt;th data-end=&quot;1004&quot; data-start=&quot;984&quot;&gt;teslimat_adresi&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody data-end=&quot;1166&quot; data-start=&quot;1090&quot;&gt;&lt;tr data-end=&quot;1166&quot; data-start=&quot;1090&quot;&gt;&lt;td&gt;1&lt;/td&gt;&lt;td&gt;101&lt;/td&gt;&lt;td&gt;Ürün A&lt;/td&gt;&lt;td&gt;2&lt;/td&gt;&lt;td&gt;50 TL&lt;/td&gt;&lt;td&gt;Adres 1&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h3 data-end=&quot;1210&quot; data-start=&quot;1168&quot;&gt;2. &lt;strong data-end=&quot;1210&quot; data-start=&quot;1175&quot;&gt;Event Tetikleme (Sipariş Olayı)&lt;/strong&gt;&lt;/h3&gt;&lt;ul data-end=&quot;1447&quot; data-start=&quot;1211&quot;&gt;&lt;li data-end=&quot;1447&quot; data-start=&quot;1211&quot;&gt;Sipariş başarılı bir şekilde yazma veri tabanına kaydedildikten sonra, bu işlem bir &lt;strong data-end=&quot;1320&quot; data-start=&quot;1297&quot;&gt;sipariş oluşturuldu&lt;/strong&gt; olayı (event) tetikler.&lt;ul data-end=&quot;1447&quot; data-start=&quot;1347&quot;&gt;&lt;li data-end=&quot;1447&quot; data-start=&quot;1347&quot;&gt;&lt;strong data-end=&quot;1365&quot; data-start=&quot;1349&quot;&gt;Event (Olay)&lt;/strong&gt;: &quot;Sipariş Oluşturuldu&quot; olayı, yazma veritabanına kaydedilen siparişi temsil eder.&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h3 data-end=&quot;1494&quot; data-start=&quot;1449&quot;&gt;3. &lt;strong data-end=&quot;1494&quot; data-start=&quot;1456&quot;&gt;Okuma (Query) İşlemi ve Güncelleme&lt;/strong&gt;&lt;/h3&gt;&lt;ul data-end=&quot;2268&quot; data-start=&quot;1495&quot;&gt;&lt;li data-end=&quot;2268&quot; data-start=&quot;1495&quot;&gt;&lt;strong data-end=&quot;1534&quot; data-start=&quot;1497&quot;&gt;Event Listener (Olay Dinleyicisi)&lt;/strong&gt;: Bu &lt;strong data-end=&quot;1564&quot; data-start=&quot;1539&quot;&gt;&quot;Sipariş Oluşturuldu&quot;&lt;/strong&gt; olayı bir &lt;strong data-end=&quot;1593&quot; data-start=&quot;1575&quot;&gt;event listener&lt;/strong&gt; tarafından dinlenir. Event listener, bu olayı aldıktan sonra okuma veri tabanını günceller.&lt;ul data-end=&quot;1995&quot; data-start=&quot;1688&quot;&gt;&lt;li data-end=&quot;1995&quot; data-start=&quot;1688&quot;&gt;&lt;strong data-end=&quot;1711&quot; data-start=&quot;1690&quot;&gt;Okuma Veri Tabanı&lt;/strong&gt; (denormalize edilmiş model):&lt;ul data-end=&quot;1995&quot; data-start=&quot;1745&quot;&gt;&lt;li data-end=&quot;1855&quot; data-start=&quot;1745&quot;&gt;Okuma veri tabanı, sadece siparişin temel bilgilerini tutar (örneğin, sipariş durumu, ürün adı, fiyat, vb.).&lt;/li&gt;&lt;li data-end=&quot;1992&quot; data-start=&quot;1860&quot;&gt;Okuma veri tabanındaki model, hızlı sorgulamalar için optimize edilmiştir, bu nedenle sadece sıklıkla sorgulanan bilgiler tutulur.&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;strong data-end=&quot;2019&quot; data-start=&quot;1998&quot;&gt;Okuma Veri Tabanı&lt;/strong&gt;:&lt;ul data-end=&quot;2268&quot; data-start=&quot;2023&quot;&gt;&lt;li data-end=&quot;2268&quot; data-start=&quot;2023&quot;&gt;&lt;code data-end=&quot;2043&quot; data-start=&quot;2025&quot;&gt;siparisler_okuma&lt;/code&gt; tablosu:&lt;table data-end=&quot;2268&quot; data-start=&quot;2057&quot;&gt;&lt;thead data-end=&quot;2124&quot; data-start=&quot;2057&quot;&gt;&lt;tr data-end=&quot;2124&quot; data-start=&quot;2057&quot;&gt;&lt;th data-end=&quot;2070&quot; data-start=&quot;2057&quot;&gt;siparis_id&lt;/th&gt;&lt;th data-end=&quot;2085&quot; data-start=&quot;2070&quot;&gt;kullanici_id&lt;/th&gt;&lt;th data-end=&quot;2097&quot; data-start=&quot;2085&quot;&gt;urun_adı&lt;/th&gt;&lt;th data-end=&quot;2106&quot; data-start=&quot;2097&quot;&gt;fiyat&lt;/th&gt;&lt;th data-end=&quot;2124&quot; data-start=&quot;2106&quot;&gt;siparis_durumu&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody data-end=&quot;2268&quot; data-start=&quot;2201&quot;&gt;&lt;tr data-end=&quot;2268&quot; data-start=&quot;2201&quot;&gt;&lt;td&gt;1&lt;/td&gt;&lt;td&gt;101&lt;/td&gt;&lt;td&gt;Ürün A&lt;/td&gt;&lt;td&gt;50 TL&lt;/td&gt;&lt;td&gt;İşlemde&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h3 data-end=&quot;2312&quot; data-start=&quot;2270&quot;&gt;4. &lt;strong data-end=&quot;2312&quot; data-start=&quot;2277&quot;&gt;Kullanıcı Siparişini Görüntüler&lt;/strong&gt;&lt;/h3&gt;&lt;ul data-end=&quot;2610&quot; data-start=&quot;2313&quot;&gt;&lt;li data-end=&quot;2388&quot; data-start=&quot;2313&quot;&gt;Kullanıcı, siparişinin durumunu görmek için okuma veri tabanını sorgular.&lt;/li&gt;&lt;li data-end=&quot;2610&quot; data-start=&quot;2389&quot;&gt;Okuma veri tabanında, &lt;strong data-end=&quot;2431&quot; data-start=&quot;2413&quot;&gt;sipariş durumu&lt;/strong&gt; gibi bilgileri hızlıca alabilir. Burada okuma veri tabanı sadece siparişle ilgili bilgilerin özetini tutar, örneğin:&lt;ul data-end=&quot;2610&quot; data-start=&quot;2551&quot;&gt;&lt;li data-end=&quot;2580&quot; data-start=&quot;2551&quot;&gt;Siparişin durumu: “İşlemde”&lt;/li&gt;&lt;li data-end=&quot;2610&quot; data-start=&quot;2583&quot;&gt;Ürün adı ve fiyat bilgisi&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p data-end=&quot;2769&quot; data-start=&quot;2612&quot;&gt;Okuma veri tabanı, sadece sıklıkla sorgulanan ve gösterilmesi gereken temel bilgileri içerdiğinden, kullanıcı sipariş bilgilerini hızlı bir şekilde alabilir.&lt;/p&gt;&lt;h3 data-end=&quot;2784&quot; data-start=&quot;2771&quot;&gt;&lt;strong data-end=&quot;2783&quot; data-start=&quot;2775&quot;&gt;Özet&lt;/strong&gt;:&lt;/h3&gt;&lt;ul data-end=&quot;3212&quot; data-start=&quot;2785&quot;&gt;&lt;li data-end=&quot;3003&quot; data-start=&quot;2785&quot;&gt;&lt;strong data-end=&quot;2807&quot; data-start=&quot;2787&quot;&gt;Yazma Veritabanı&lt;/strong&gt;: Siparişin tüm detayları (örneğin, ürün adı, miktar, fiyat, teslimat adresi vb.) normalize edilmiş biçimde kaydedilir. Bu veritabanı, veri tutarlılığını sağlamak için ACID özelliklerine sahiptir.&lt;/li&gt;&lt;li data-end=&quot;3212&quot; data-start=&quot;3004&quot;&gt;&lt;strong data-end=&quot;3026&quot; data-start=&quot;3006&quot;&gt;Okuma Veritabanı&lt;/strong&gt;: Siparişin özet bilgileri (örneğin, ürün adı, fiyat, sipariş durumu) denormalize edilmiştir. Bu veri tabanı, sadece okuma işlemleri için optimize edilmiştir ve sorgulama hızını artırır.&lt;/li&gt;&lt;/ul&gt;&lt;h4 data-end=&quot;3234&quot; data-start=&quot;3214&quot;&gt;&lt;strong data-end=&quot;3233&quot; data-start=&quot;3219&quot;&gt;Olay Akışı&lt;/strong&gt;:&lt;/h4&gt;&lt;ol data-end=&quot;3565&quot; data-start=&quot;3235&quot;&gt;&lt;li data-end=&quot;3308&quot; data-start=&quot;3235&quot;&gt;&lt;strong data-end=&quot;3274&quot; data-start=&quot;3238&quot;&gt;Yazma işlemi (sipariş oluşturma)&lt;/strong&gt; → Yazma veri tabanına kaydedilir.&lt;/li&gt;&lt;li data-end=&quot;3387&quot; data-start=&quot;3309&quot;&gt;&lt;strong data-end=&quot;3349&quot; data-start=&quot;3312&quot;&gt;Event (sipariş oluşturulma olayı)&lt;/strong&gt; → Event listener tarafından dinlenir.&lt;/li&gt;&lt;li data-end=&quot;3460&quot; data-start=&quot;3388&quot;&gt;&lt;strong data-end=&quot;3424&quot; data-start=&quot;3391&quot;&gt;Okuma veri tabanı güncellenir&lt;/strong&gt; → Siparişin özet bilgileri eklenir.&lt;/li&gt;&lt;li data-end=&quot;3565&quot; data-start=&quot;3461&quot;&gt;&lt;strong data-end=&quot;3497&quot; data-start=&quot;3464&quot;&gt;Kullanıcı siparişini sorgular&lt;/strong&gt; → Okuma veri tabanından hızlı bir şekilde sipariş bilgileri alınır.&lt;/li&gt;&lt;/ol&gt;&lt;h3 data-end=&quot;3596&quot; data-start=&quot;3567&quot;&gt;&lt;strong data-end=&quot;3595&quot; data-start=&quot;3571&quot;&gt;Veri Senkronizasyonu&lt;/strong&gt;:&lt;/h3&gt;&lt;ul data-end=&quot;3991&quot; data-start=&quot;3597&quot;&gt;&lt;li data-end=&quot;3858&quot; data-start=&quot;3597&quot;&gt;&lt;strong data-end=&quot;3623&quot; data-start=&quot;3599&quot;&gt;Eventual Consistency&lt;/strong&gt;: Yazma ve okuma veri tabanları arasındaki güncelleme işlemi &lt;strong data-end=&quot;3694&quot; data-start=&quot;3684&quot;&gt;anında&lt;/strong&gt; yapılmaz. Bunun yerine &lt;strong data-end=&quot;3742&quot; data-start=&quot;3718&quot;&gt;&quot;sonunda tutarlılık&quot;&lt;/strong&gt; sağlanır. Yani, yazma işlemi hemen okuma veri tabanına yansımaz, ancak bir süre sonra okuma veritabanı güncellenir.&lt;/li&gt;&lt;li data-end=&quot;3991&quot; data-start=&quot;3859&quot;&gt;&lt;strong data-end=&quot;3887&quot; data-start=&quot;3861&quot;&gt;Asenkron Güncellemeler&lt;/strong&gt;: Okuma veritabanı, yazma veritabanında yapılan değişikliklerden sonra asenkron bir şekilde güncellenir.&lt;/li&gt;&lt;/ul&gt;&lt;h3 data-end=&quot;4007&quot; data-start=&quot;3993&quot;&gt;&lt;strong data-end=&quot;4006&quot; data-start=&quot;3997&quot;&gt;Sonuç&lt;/strong&gt;:&lt;/h3&gt;&lt;p data-end=&quot;4398&quot; data-is-last-node=&quot;&quot; data-is-only-node=&quot;&quot; data-start=&quot;4008&quot;&gt;Bu senaryoda &lt;strong data-end=&quot;4029&quot; data-start=&quot;4021&quot;&gt;CQRS&lt;/strong&gt; deseni sayesinde, yazma ve okuma işlemleri birbirinden ayrılmıştır. Yazma işlemleri için veri modeli karmaşık ve normalleştirilmiş, okuma işlemleri için ise basit ve hızlı sorgulama için optimize edilmiş bir yapı kullanılmıştır. Bu yaklaşım, yüksek verimlilik ve ölçeklenebilirlik sağlar, çünkü okuma ve yazma işlemleri birbirinden bağımsız olarak optimize edilebilir.&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://mehmetyoldas.blogspot.com/feeds/3883948619753812040/comments/default' title='Kayıt Yorumları'/><link rel='replies' type='text/html' href='http://mehmetyoldas.blogspot.com/2025/03/cqrs-desenini-kullanarak-basit-bir.html#comment-form' title='0 Yorum'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5628326400009361051/posts/default/3883948619753812040'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5628326400009361051/posts/default/3883948619753812040'/><link rel='alternate' type='text/html' href='http://mehmetyoldas.blogspot.com/2025/03/cqrs-desenini-kullanarak-basit-bir.html' title='CQRS Desenini Kullanarak Basit Bir Senaryo Tasarımı'/><author><name>Mehmet Yoldaş</name><uri>http://www.blogger.com/profile/17372934623166164299</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVw6x10V3awMwQJFzrhYEEvr-YMR-YcaKARcY29nS8Ny67irGfpUKqZ4uvXuwn6LQhPqNtJq5NQ4rkOE0x29vlgd4UNHA9D6B3uo8_D6VU7-5TZyDRRW-W6MAgLjn7DA/s220/profil+Ba%C5%9Fak+Foto%C4%9Fraf%C3%A7%C4%B1l%C4%B1k.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5628326400009361051.post-3347058102136940125</id><published>2025-03-02T13:15:00.001+03:00</published><updated>2025-03-02T13:15:10.980+03:00</updated><title type='text'>Okuma ve Yazma Veritabanlarının Ayrılması</title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;strong data-end=&quot;586&quot; data-start=&quot;566&quot;&gt;Yazma Veritabanı&lt;/strong&gt; (Command Model):&lt;/p&gt;&lt;ul data-end=&quot;860&quot; data-start=&quot;605&quot;&gt;&lt;li data-end=&quot;857&quot; data-start=&quot;605&quot;&gt;Bu, veri üzerinde değişiklik yapan (yeni veri ekleyen, güncelleyen, silen) işlemler için kullanılan veritabanıdır. Genellikle &lt;strong data-end=&quot;754&quot; data-start=&quot;733&quot;&gt;normalize edilmiş&lt;/strong&gt; veri yapıları içerir, yani her veri parçası birden fazla tablodan oluşabilir ve ilişkiler karmaşıktır.&lt;/li&gt;&lt;/ul&gt;&lt;p data-end=&quot;897&quot; data-start=&quot;861&quot;&gt;&lt;strong data-end=&quot;881&quot; data-start=&quot;861&quot;&gt;Okuma Veritabanı&lt;/strong&gt; (Query Model):&lt;/p&gt;&lt;ul data-end=&quot;1166&quot; data-start=&quot;898&quot;&gt;&lt;li data-end=&quot;1166&quot; data-start=&quot;898&quot;&gt;Okuma veritabanı ise daha hızlı ve verimli sorgular yapmak için &lt;strong data-end=&quot;979&quot; data-start=&quot;964&quot;&gt;denormalize&lt;/strong&gt; edilmiş veri yapıları içerir. Yani, birden fazla tabloyu tek bir yerde birleştiren daha basit ve hızlı veri yapılarına sahiptir. Bu veri tabanı, okuma işlemleri için optimize edilmiştir.&lt;/li&gt;&lt;/ul&gt;&lt;h3 data-end=&quot;1220&quot; data-start=&quot;1168&quot;&gt;&lt;strong data-end=&quot;1220&quot; data-start=&quot;1172&quot;&gt;Yeni Veriler Okuma Veritabanına Nasıl Gelir?&lt;/strong&gt;&lt;/h3&gt;&lt;p data-end=&quot;1603&quot; data-start=&quot;1222&quot;&gt;Bu süreçte iki ana yaklaşım vardır: &lt;strong data-end=&quot;1282&quot; data-start=&quot;1258&quot;&gt;Eventual Consistency&lt;/strong&gt; (sonunda tutarlılık) ve &lt;strong data-end=&quot;1325&quot; data-start=&quot;1307&quot;&gt;Event Sourcing&lt;/strong&gt; kullanımı. Yazma ve okuma veri tabanlarının eşitlenmesi (synchronization) için, yazma veri tabanında yapılan değişikliklerin okuma veri tabanına aktarılması gerekir. Bu işlem genellikle &lt;strong data-end=&quot;1532&quot; data-start=&quot;1512&quot;&gt;bir olay (event)&lt;/strong&gt; tetiklendiğinde yapılır. Aşağıda, bunun nasıl çalıştığını açıklayalım:&lt;/p&gt;&lt;h4 data-end=&quot;1659&quot; data-start=&quot;1605&quot;&gt;&lt;strong data-end=&quot;1658&quot; data-start=&quot;1610&quot;&gt;1. Eventual Consistency (Sonunda Tutarlılık)&lt;/strong&gt;:&lt;/h4&gt;&lt;p data-end=&quot;1876&quot; data-start=&quot;1660&quot;&gt;Bu yaklaşımda, yazma ve okuma veri tabanları arasında &lt;strong data-end=&quot;1724&quot; data-start=&quot;1714&quot;&gt;anında&lt;/strong&gt; bir tutarlılık sağlanmaz. Yazma işlemleri (komutlar) önce yazma veri tabanında yapılır, sonra okuma veri tabanındaki veriler, &lt;strong data-end=&quot;1863&quot; data-start=&quot;1851&quot;&gt;sonradan&lt;/strong&gt; güncellenir.&lt;/p&gt;&lt;ul data-end=&quot;2322&quot; data-start=&quot;1878&quot;&gt;&lt;li data-end=&quot;2322&quot; data-start=&quot;1878&quot;&gt;&lt;strong data-end=&quot;1891&quot; data-start=&quot;1880&quot;&gt;Adımlar&lt;/strong&gt;:&lt;ol data-end=&quot;2322&quot; data-start=&quot;1895&quot;&gt;&lt;li data-end=&quot;1992&quot; data-start=&quot;1895&quot;&gt;&lt;strong data-end=&quot;1912&quot; data-start=&quot;1898&quot;&gt;Veri yazma&lt;/strong&gt;: Kullanıcı bir sipariş oluşturduğunda, bu işlem yazma veri tabanına kaydedilir.&lt;/li&gt;&lt;li data-end=&quot;2112&quot; data-start=&quot;1995&quot;&gt;&lt;strong data-end=&quot;2017&quot; data-start=&quot;1998&quot;&gt;Event Gönderimi&lt;/strong&gt;: Yazma işlemi tamamlandığında, bir &lt;strong data-end=&quot;2078&quot; data-start=&quot;2053&quot;&gt;&quot;sipariş oluşturuldu&quot;&lt;/strong&gt; gibi bir olay (event) tetiklenir.&lt;/li&gt;&lt;li data-end=&quot;2322&quot; data-start=&quot;2115&quot;&gt;&lt;strong data-end=&quot;2152&quot; data-start=&quot;2118&quot;&gt;Okuma Veri Tabanı Güncellemesi&lt;/strong&gt;: Bu olay, okuma veri tabanını güncelleyen bir mekanizma tarafından alınır. Bu mekanizma, okuma veri tabanına yeni sipariş bilgilerini ekler veya mevcut veriyi günceller.&lt;/li&gt;&lt;/ol&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p data-end=&quot;2334&quot; data-start=&quot;2324&quot;&gt;&lt;strong data-end=&quot;2333&quot; data-start=&quot;2324&quot;&gt;Örnek&lt;/strong&gt;:&lt;/p&gt;&lt;ul data-end=&quot;2699&quot; data-start=&quot;2335&quot;&gt;&lt;li data-end=&quot;2699&quot; data-start=&quot;2335&quot;&gt;&lt;p data-end=&quot;2569&quot; data-start=&quot;2337&quot;&gt;&lt;strong data-end=&quot;2361&quot; data-start=&quot;2337&quot;&gt;Sipariş mikroservisi&lt;/strong&gt;: Sipariş oluşturulduğunda, yazma veritabanına kaydedilir. Ancak okuma veritabanı bu yeni siparişi görmek için yazma veritabanından bir &quot;sipariş oluşturuldu&quot; olayı alır ve bu veriyi okuma veri tabanına ekler.&lt;/p&gt;&lt;p data-end=&quot;2699&quot; data-start=&quot;2575&quot;&gt;&lt;strong data-end=&quot;2582&quot; data-start=&quot;2575&quot;&gt;Not&lt;/strong&gt;: Eventual Consistency, &lt;strong data-end=&quot;2627&quot; data-start=&quot;2606&quot;&gt;anında tutarlılık&lt;/strong&gt; sağlamaz, ancak zaman içinde her iki veri tabanı da tutarlı hale gelir.&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h4 data-end=&quot;2728&quot; data-start=&quot;2701&quot;&gt;&lt;strong data-end=&quot;2727&quot; data-start=&quot;2706&quot;&gt;2. Event Sourcing&lt;/strong&gt;:&lt;/h4&gt;&lt;p data-end=&quot;2912&quot; data-start=&quot;2729&quot;&gt;Event Sourcing, her yazma işlemine bir &lt;strong data-end=&quot;2784&quot; data-start=&quot;2768&quot;&gt;olay (event)&lt;/strong&gt; kaydeder. Bu olaylar yazma veritabanına kaydedilir ve okuma veritabanı bu olayları dinler ve veri modelini buna göre günceller.&lt;/p&gt;&lt;ul data-end=&quot;3243&quot; data-start=&quot;2914&quot;&gt;&lt;li data-end=&quot;3243&quot; data-start=&quot;2914&quot;&gt;&lt;strong data-end=&quot;2927&quot; data-start=&quot;2916&quot;&gt;Adımlar&lt;/strong&gt;:&lt;ol data-end=&quot;3243&quot; data-start=&quot;2931&quot;&gt;&lt;li data-end=&quot;3068&quot; data-start=&quot;2931&quot;&gt;&lt;strong data-end=&quot;2951&quot; data-start=&quot;2934&quot;&gt;Event Oluşumu&lt;/strong&gt;: Kullanıcı bir sipariş oluşturduğunda, bu işlem bir olay (event) olarak kaydedilir (örneğin: &quot;Sipariş Oluşturuldu&quot;).&lt;/li&gt;&lt;li data-end=&quot;3243&quot; data-start=&quot;3071&quot;&gt;&lt;strong data-end=&quot;3103&quot; data-start=&quot;3074&quot;&gt;Event Sourcing Uygulaması&lt;/strong&gt;: Event sourcing mekanizması, bu olayı hem yazma veritabanında hem de okuma veri tabanında uygular. Bu sayede okuma veri tabanı güncellenir.&lt;/li&gt;&lt;/ol&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p data-end=&quot;3255&quot; data-start=&quot;3245&quot;&gt;&lt;strong data-end=&quot;3254&quot; data-start=&quot;3245&quot;&gt;Örnek&lt;/strong&gt;:&lt;/p&gt;&lt;ul data-end=&quot;3423&quot; data-start=&quot;3256&quot;&gt;&lt;li data-end=&quot;3423&quot; data-start=&quot;3256&quot;&gt;Sipariş oluşturulduğunda, bu olay &lt;strong data-end=&quot;3315&quot; data-start=&quot;3292&quot;&gt;&quot;Sipariş Oluşturma&quot;&lt;/strong&gt; olarak kaydedilir. Okuma servisi, bu olayı alır ve okuma veri tabanında &lt;strong data-end=&quot;3412&quot; data-start=&quot;3388&quot;&gt;siparişler tablosunu&lt;/strong&gt; günceller.&lt;/li&gt;&lt;/ul&gt;&lt;h4 data-end=&quot;3457&quot; data-start=&quot;3425&quot;&gt;&lt;strong data-end=&quot;3456&quot; data-start=&quot;3430&quot;&gt;3. Asenkron Güncelleme&lt;/strong&gt;:&lt;/h4&gt;&lt;p data-end=&quot;3856&quot; data-start=&quot;3458&quot;&gt;Çoğu mikroservis mimarisinde, &lt;strong data-end=&quot;3507&quot; data-start=&quot;3488&quot;&gt;asenkron işleme&lt;/strong&gt; kullanılır. Yazma işlemi gerçekleştiğinde, okuma veritabanının güncellenmesi için bir &lt;strong data-end=&quot;3611&quot; data-start=&quot;3594&quot;&gt;mesaj kuyruğu&lt;/strong&gt; (message queue) veya &lt;strong data-end=&quot;3649&quot; data-start=&quot;3633&quot;&gt;event stream&lt;/strong&gt; (örneğin, Apache Kafka veya RabbitMQ) kullanılır. Bu şekilde, yazma işleminden sonra hemen okuma veritabanı güncellenmez, bunun yerine bir mesaj veya olay kuyruğa atılır ve okuma veritabanı bu olayı dinler.&lt;/p&gt;&lt;ul data-end=&quot;4093&quot; data-start=&quot;3858&quot;&gt;&lt;li data-end=&quot;4093&quot; data-start=&quot;3858&quot;&gt;&lt;strong data-end=&quot;3871&quot; data-start=&quot;3860&quot;&gt;Adımlar&lt;/strong&gt;:&lt;ol data-end=&quot;4093&quot; data-start=&quot;3875&quot;&gt;&lt;li data-end=&quot;3927&quot; data-start=&quot;3875&quot;&gt;Yazma işlemi gerçekleşir ve &lt;strong data-end=&quot;3915&quot; data-start=&quot;3906&quot;&gt;event&lt;/strong&gt; tetiklenir.&lt;/li&gt;&lt;li data-end=&quot;3971&quot; data-start=&quot;3930&quot;&gt;Event, bir mesaj kuyruğuna gönderilir.&lt;/li&gt;&lt;li data-end=&quot;4093&quot; data-start=&quot;3974&quot;&gt;Okuma veritabanını yöneten mikroservis, bu kuyruğu dinler ve yeni verileri okuma veri tabanına ekler veya günceller.&lt;/li&gt;&lt;/ol&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p data-end=&quot;4105&quot; data-start=&quot;4095&quot;&gt;&lt;strong data-end=&quot;4104&quot; data-start=&quot;4095&quot;&gt;Örnek&lt;/strong&gt;:&lt;/p&gt;&lt;ul data-end=&quot;4291&quot; data-start=&quot;4106&quot;&gt;&lt;li data-end=&quot;4208&quot; data-start=&quot;4106&quot;&gt;Sipariş oluşturulduğunda, bir &lt;strong data-end=&quot;4163&quot; data-start=&quot;4138&quot;&gt;&quot;sipariş oluşturuldu&quot;&lt;/strong&gt; olayı bir &lt;strong data-end=&quot;4196&quot; data-start=&quot;4174&quot;&gt;RabbitMQ kuyruğuna&lt;/strong&gt; gönderilir.&lt;/li&gt;&lt;li data-end=&quot;4291&quot; data-start=&quot;4209&quot;&gt;Okuma mikroservisi, bu kuyruğu dinler ve okuma veritabanındaki veriyi günceller.&lt;/li&gt;&lt;/ul&gt;&lt;h4 data-end=&quot;4330&quot; data-start=&quot;4293&quot;&gt;&lt;strong data-end=&quot;4329&quot; data-start=&quot;4298&quot;&gt;4. Sık Güncelleme (Polling)&lt;/strong&gt;:&lt;/h4&gt;&lt;p data-end=&quot;4583&quot; data-start=&quot;4331&quot;&gt;Bir başka yaklaşım ise, yazma ve okuma veri tabanları arasındaki senkronizasyonu belirli aralıklarla &lt;strong data-end=&quot;4443&quot; data-start=&quot;4432&quot;&gt;polling&lt;/strong&gt; yaparak sağlamaktır. Okuma mikroservisi, belirli aralıklarla yazma veri tabanını sorgular ve değişiklik varsa okuma veritabanını günceller.&lt;/p&gt;&lt;p data-end=&quot;4595&quot; data-start=&quot;4585&quot;&gt;&lt;strong data-end=&quot;4594&quot; data-start=&quot;4585&quot;&gt;Örnek&lt;/strong&gt;:&lt;/p&gt;&lt;ul data-end=&quot;4733&quot; data-start=&quot;4596&quot;&gt;&lt;li data-end=&quot;4733&quot; data-start=&quot;4596&quot;&gt;Sipariş yazıldığında, okuma servisi her 5 saniyede bir yazma veri tabanını kontrol eder ve yeni siparişleri okuma veritabanına aktarır.&lt;/li&gt;&lt;/ul&gt;&lt;h3 data-end=&quot;4749&quot; data-start=&quot;4735&quot;&gt;&lt;strong data-end=&quot;4749&quot; data-start=&quot;4739&quot;&gt;Sonuç:&lt;/strong&gt;&lt;/h3&gt;&lt;p data-end=&quot;5437&quot; data-is-last-node=&quot;&quot; data-is-only-node=&quot;&quot; data-start=&quot;4750&quot;&gt;Yazma ve okuma veri tabanlarının ayrılması, mikroservis mimarisinde yaygın bir CQRS uygulamasıdır. Yazma veritabanı, verilerin tutarlılığını ve işlem bütünlüğünü sağlarken, okuma veritabanı yalnızca okuma işlemlerine yönelik optimize edilmiş veri yapılarını tutar. Yazma veritabanında yapılan yeni işlemler, &lt;strong data-end=&quot;5074&quot; data-start=&quot;5058&quot;&gt;event-driven&lt;/strong&gt; veya &lt;strong data-end=&quot;5103&quot; data-start=&quot;5080&quot;&gt;asenkron güncelleme&lt;/strong&gt; teknikleriyle okuma veri tabanına aktarılır, böylece iki veri tabanı arasında tutarlılık sağlanır. Bu yaklaşımda &lt;strong data-end=&quot;5241&quot; data-start=&quot;5217&quot;&gt;eventual consistency&lt;/strong&gt; (sonunda tutarlılık) esas alınır, bu da yazma ve okuma veri tabanları arasında anında tutarlılık sağlanmadığı, ancak bir süre sonra her iki veri tabanının da tutarlı hale geleceği anlamına gelir.&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://mehmetyoldas.blogspot.com/feeds/3347058102136940125/comments/default' title='Kayıt Yorumları'/><link rel='replies' type='text/html' href='http://mehmetyoldas.blogspot.com/2025/03/okuma-ve-yazma-veritabanlarnn-ayrlmas.html#comment-form' title='0 Yorum'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5628326400009361051/posts/default/3347058102136940125'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5628326400009361051/posts/default/3347058102136940125'/><link rel='alternate' type='text/html' href='http://mehmetyoldas.blogspot.com/2025/03/okuma-ve-yazma-veritabanlarnn-ayrlmas.html' title='Okuma ve Yazma Veritabanlarının Ayrılması'/><author><name>Mehmet Yoldaş</name><uri>http://www.blogger.com/profile/17372934623166164299</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVw6x10V3awMwQJFzrhYEEvr-YMR-YcaKARcY29nS8Ny67irGfpUKqZ4uvXuwn6LQhPqNtJq5NQ4rkOE0x29vlgd4UNHA9D6B3uo8_D6VU7-5TZyDRRW-W6MAgLjn7DA/s220/profil+Ba%C5%9Fak+Foto%C4%9Fraf%C3%A7%C4%B1l%C4%B1k.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5628326400009361051.post-8100373244311875580</id><published>2025-03-02T13:11:00.000+03:00</published><updated>2025-03-02T13:11:11.689+03:00</updated><title type='text'>Yazma ve Okuma Ayrımının Mikroservis Düzeyindeki Uygulaması</title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h3 data-end=&quot;403&quot; data-start=&quot;336&quot;&gt;CQRS, mikroservisler bağlamında şu şekilde çalışır:&lt;/h3&gt;&lt;h4 data-end=&quot;496&quot; data-start=&quot;458&quot;&gt;1. &lt;strong data-end=&quot;495&quot; data-start=&quot;466&quot;&gt;Yazma (Command) İşlemleri&lt;/strong&gt;:&lt;/h4&gt;&lt;ul data-end=&quot;999&quot; data-start=&quot;500&quot;&gt;&lt;li data-end=&quot;613&quot; data-start=&quot;500&quot;&gt;Her mikroservis, yazma işlemleri için kendi &lt;strong data-end=&quot;565&quot; data-start=&quot;546&quot;&gt;command handler&lt;/strong&gt; (komut işleyici) ve &lt;strong data-end=&quot;603&quot; data-start=&quot;586&quot;&gt;veri modelini&lt;/strong&gt; kullanır.&lt;/li&gt;&lt;li data-end=&quot;817&quot; data-start=&quot;617&quot;&gt;Yazma işlemleri, genellikle veri tutarlılığını sağlamak için daha karmaşık ve normalleştirilmiş (normalized) veri modellerine dayanır. Bu modeller, işlem tutarlılığı (ACID) için optimize edilmiştir.&lt;/li&gt;&lt;li data-end=&quot;999&quot; data-start=&quot;821&quot;&gt;Örneğin, bir &lt;strong data-end=&quot;860&quot; data-start=&quot;836&quot;&gt;sipariş mikroservisi&lt;/strong&gt; bir müşteri siparişi alırken, ödeme bilgileri ve ürün bilgilerini aynı tabloda tutabilir, ancak bu sadece yazma işlemleri için geçerlidir.&lt;/li&gt;&lt;/ul&gt;&lt;h4 data-end=&quot;1037&quot; data-start=&quot;1001&quot;&gt;2. &lt;strong data-end=&quot;1036&quot; data-start=&quot;1009&quot;&gt;Okuma (Query) İşlemleri&lt;/strong&gt;:&lt;/h4&gt;&lt;ul data-end=&quot;1634&quot; data-start=&quot;1041&quot;&gt;&lt;li data-end=&quot;1253&quot; data-start=&quot;1041&quot;&gt;Okuma işlemleri için ise mikroservisler, genellikle &lt;strong data-end=&quot;1117&quot; data-start=&quot;1095&quot;&gt;sorgu işleyicileri&lt;/strong&gt; kullanarak &lt;strong data-end=&quot;1152&quot; data-start=&quot;1129&quot;&gt;denormalize edilmiş&lt;/strong&gt; (yani daha basit ve verimli okuma için optimize edilmiş) veri modellerine dayalı bir yapı oluşturur.&lt;/li&gt;&lt;li data-end=&quot;1437&quot; data-start=&quot;1257&quot;&gt;Okuma işlemleri, yazma işlemine göre daha hızlı ve verimli olması adına farklı veri yapıları ve veri tabanları kullanabilir. Bu, okuma verilerinin daha hızlı ulaşılmasını sağlar.&lt;/li&gt;&lt;li data-end=&quot;1634&quot; data-start=&quot;1441&quot;&gt;Örneğin, aynı &lt;strong data-end=&quot;1481&quot; data-start=&quot;1457&quot;&gt;sipariş mikroservisi&lt;/strong&gt; okuma için sadece sipariş durumu, toplam fiyat gibi özet verileri içeren bir veri modelini kullanabilir, tüm sipariş detaylarını burada tutmak gerekmez.&lt;/li&gt;&lt;/ul&gt;&lt;h3 data-end=&quot;1678&quot; data-start=&quot;1636&quot;&gt;&lt;strong data-end=&quot;1678&quot; data-start=&quot;1640&quot;&gt;Mikroservis Düzeyinde Ayrım Örneği&lt;/strong&gt;&lt;/h3&gt;&lt;p data-end=&quot;1715&quot; data-start=&quot;1680&quot;&gt;Bir e-ticaret uygulamasını düşünün:&lt;/p&gt;&lt;ul data-end=&quot;2556&quot; data-start=&quot;1717&quot;&gt;&lt;li data-end=&quot;2188&quot; data-start=&quot;1717&quot;&gt;&lt;p data-end=&quot;1745&quot; data-start=&quot;1719&quot;&gt;&lt;strong data-end=&quot;1743&quot; data-start=&quot;1719&quot;&gt;Sipariş Mikroservisi&lt;/strong&gt;:&lt;/p&gt;&lt;ul data-end=&quot;2188&quot; data-start=&quot;1749&quot;&gt;&lt;li data-end=&quot;2014&quot; data-start=&quot;1749&quot;&gt;Yazma işlemleri (komutlar) için, sipariş oluşturma, ödeme alma, ürünleri güncelleme gibi işlemler yapılır. Bu işlemler, veritabanında normalize edilmiş bir modelle yapılır (örneğin, her bir siparişin müşteri ve ürün bilgileri, ödeme durumu gibi detayları içerir).&lt;/li&gt;&lt;li data-end=&quot;2188&quot; data-start=&quot;2018&quot;&gt;Okuma işlemleri (sorgular) için, sadece siparişin durumu, tarih ve toplam tutar gibi bilgileri içeren basit bir model kullanılabilir. Bu, okuma işlemlerini hızlandırır.&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li data-end=&quot;2556&quot; data-start=&quot;2190&quot;&gt;&lt;p data-end=&quot;2219&quot; data-start=&quot;2192&quot;&gt;&lt;strong data-end=&quot;2218&quot; data-start=&quot;2192&quot;&gt;Kullanıcı Mikroservisi&lt;/strong&gt;:&lt;/p&gt;&lt;ul data-end=&quot;2556&quot; data-start=&quot;2223&quot;&gt;&lt;li data-end=&quot;2402&quot; data-start=&quot;2223&quot;&gt;Kullanıcı yazma işlemleri, kullanıcının kaydını güncellemek, yeni kullanıcı eklemek vb. işlemlerle yapılır. Kullanıcı bilgileri normalleştirilmiş bir veri yapısında tutulabilir.&lt;/li&gt;&lt;li data-end=&quot;2556&quot; data-start=&quot;2406&quot;&gt;Kullanıcı okuma işlemleri ise sadece kullanıcı adı, e-posta gibi bilgilerle ilgili sorgular olabilir, denormalize edilmiş bir yapıya sahip olabilir.&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h3 data-end=&quot;2602&quot; data-start=&quot;2558&quot;&gt;&lt;strong data-end=&quot;2601&quot; data-start=&quot;2562&quot;&gt;Mikroservisler Arasında Veri Ayrımı&lt;/strong&gt;:&lt;/h3&gt;&lt;p data-end=&quot;2746&quot; data-start=&quot;2603&quot;&gt;Yazma ve okuma işlemlerinin ayrılması yalnızca tek bir mikroservis içinde değil, aynı zamanda &lt;strong data-end=&quot;2724&quot; data-start=&quot;2697&quot;&gt;mikroservisler arasında&lt;/strong&gt; da olabilir. Örneğin:&lt;/p&gt;&lt;ul data-end=&quot;3177&quot; data-start=&quot;2748&quot;&gt;&lt;li data-end=&quot;3000&quot; data-start=&quot;2748&quot;&gt;&lt;p data-end=&quot;3000&quot; data-start=&quot;2750&quot;&gt;&lt;strong data-end=&quot;2774&quot; data-start=&quot;2750&quot;&gt;Sipariş Mikroservisi&lt;/strong&gt; yazma ve okuma işlemleri için ayrı modeller ve veri tabanları kullanabilir. Sipariş oluşturulurken veritabanına yazılır ve okuma işlemleri için farklı bir &lt;strong data-end=&quot;2959&quot; data-start=&quot;2930&quot;&gt;denormalize veri modeline&lt;/strong&gt; sahip bir okuma servisi oluşturulabilir.&lt;/p&gt;&lt;/li&gt;&lt;li data-end=&quot;3177&quot; data-start=&quot;3004&quot;&gt;&lt;p data-end=&quot;3177&quot; data-start=&quot;3006&quot;&gt;&lt;strong data-end=&quot;3032&quot; data-start=&quot;3006&quot;&gt;Kullanıcı Mikroservisi&lt;/strong&gt;&#39;nde de benzer şekilde kullanıcı verilerini yönetirken yazma ve okuma işlemleri için farklı veri modelleri ve depolama teknikleri kullanılabilir.&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h3 data-end=&quot;3228&quot; data-start=&quot;3179&quot;&gt;&lt;strong data-end=&quot;3227&quot; data-start=&quot;3183&quot;&gt;Veritabanı Ayrımı (Database Per Service)&lt;/strong&gt;:&lt;/h3&gt;&lt;p data-end=&quot;3427&quot; data-start=&quot;3229&quot;&gt;CQRS, mikroservislerin her birinin kendi veritabanına sahip olmasına olanak tanır. Bu, mikroservisin sadece kendi yazma ve okuma işlemlerini etkileyecek şekilde veri üzerinde işlem yapmasını sağlar.&lt;/p&gt;&lt;ul data-end=&quot;3818&quot; data-start=&quot;3429&quot;&gt;&lt;li data-end=&quot;3601&quot; data-start=&quot;3429&quot;&gt;&lt;strong data-end=&quot;3451&quot; data-start=&quot;3431&quot;&gt;Yazma Veritabanı&lt;/strong&gt;: Bu veritabanı yazma işlemleri için optimize edilmiş olabilir. Normalleştirilmiş veri yapıları, transaction yönetimi ve ACID özelliklerine odaklanır.&lt;/li&gt;&lt;li data-end=&quot;3818&quot; data-start=&quot;3602&quot;&gt;&lt;strong data-end=&quot;3624&quot; data-start=&quot;3604&quot;&gt;Okuma Veritabanı&lt;/strong&gt;: Okuma işlemleri için denormalize edilmiş veri yapıları kullanılarak performans artırılabilir. Okuma servisi farklı bir veri tabanı ya da indeksleme sistemi kullanarak okuma hızını artırabilir.&lt;/li&gt;&lt;/ul&gt;&lt;h3 data-end=&quot;3872&quot; data-start=&quot;3820&quot;&gt;&lt;strong data-end=&quot;3871&quot; data-start=&quot;3824&quot;&gt;CQRS’in Mikroservislerde Sağladığı Faydalar&lt;/strong&gt;:&lt;/h3&gt;&lt;ol data-end=&quot;4576&quot; data-start=&quot;3873&quot;&gt;&lt;li data-end=&quot;4038&quot; data-start=&quot;3873&quot;&gt;&lt;strong data-end=&quot;3910&quot; data-start=&quot;3876&quot;&gt;Özelleştirilmiş Veri Modelleri&lt;/strong&gt;: Her mikroservis, yazma ve okuma işlemleri için farklı veri yapıları kullanabilir. Bu, her bir işlemi optimize etmenizi sağlar.&lt;/li&gt;&lt;li data-end=&quot;4172&quot; data-start=&quot;4039&quot;&gt;&lt;strong data-end=&quot;4063&quot; data-start=&quot;4042&quot;&gt;Yüksek Performans&lt;/strong&gt;: Okuma işlemleri için denormalize edilmiş veri yapıları kullanılabilir, bu da okuma işlemlerini hızlandırır.&lt;/li&gt;&lt;li data-end=&quot;4369&quot; data-start=&quot;4173&quot;&gt;&lt;strong data-end=&quot;4206&quot; data-start=&quot;4176&quot;&gt;Bağımsız Ölçeklenebilirlik&lt;/strong&gt;: Yazma ve okuma işlemleri farklı mikroservisler olarak ayrı ayrı ölçeklenebilir. Bu, okuma trafiği arttığında okuma mikroservislerinin ölçeklendirilmesini sağlar.&lt;/li&gt;&lt;li data-end=&quot;4576&quot; data-start=&quot;4370&quot;&gt;&lt;strong data-end=&quot;4397&quot; data-start=&quot;4373&quot;&gt;Transaction Yönetimi&lt;/strong&gt;: Yazma işlemleri genellikle daha karmaşıktır ve ACID özellikleri sağlamak için özel transaction yönetimi gerektirir. Okuma işlemleri ise daha hızlı ve performans odaklı olabilir.&lt;/li&gt;&lt;/ol&gt;&lt;h3 data-end=&quot;4592&quot; data-start=&quot;4578&quot;&gt;&lt;strong data-end=&quot;4591&quot; data-start=&quot;4582&quot;&gt;Sonuç&lt;/strong&gt;:&lt;/h3&gt;&lt;p data-end=&quot;5036&quot; data-is-last-node=&quot;&quot; data-is-only-node=&quot;&quot; data-start=&quot;4593&quot;&gt;CQRS, mikroservislerde &lt;strong data-end=&quot;4625&quot; data-start=&quot;4616&quot;&gt;yazma&lt;/strong&gt; ve &lt;strong data-end=&quot;4648&quot; data-start=&quot;4629&quot;&gt;okuma işlemleri&lt;/strong&gt; arasındaki ayrımı netleştirir ve her iki işlem için farklı veri yapılarını ve işlevleri kullanmanıza olanak tanır. Bu, veritabanı tasarımında, işlem tutarlılığında ve performans iyileştirmelerinde önemli faydalar sağlar. Ayrıca mikroservisler düzeyinde uygulandığında, her bir mikroservisin yalnızca ilgili işlem için optimize edilmesi, sistemi daha esnek ve ölçeklenebilir hale getirir.&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://mehmetyoldas.blogspot.com/feeds/8100373244311875580/comments/default' title='Kayıt Yorumları'/><link rel='replies' type='text/html' href='http://mehmetyoldas.blogspot.com/2025/03/yazma-ve-okuma-ayrmnn-mikroservis.html#comment-form' title='0 Yorum'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5628326400009361051/posts/default/8100373244311875580'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5628326400009361051/posts/default/8100373244311875580'/><link rel='alternate' type='text/html' href='http://mehmetyoldas.blogspot.com/2025/03/yazma-ve-okuma-ayrmnn-mikroservis.html' title='Yazma ve Okuma Ayrımının Mikroservis Düzeyindeki Uygulaması'/><author><name>Mehmet Yoldaş</name><uri>http://www.blogger.com/profile/17372934623166164299</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVw6x10V3awMwQJFzrhYEEvr-YMR-YcaKARcY29nS8Ny67irGfpUKqZ4uvXuwn6LQhPqNtJq5NQ4rkOE0x29vlgd4UNHA9D6B3uo8_D6VU7-5TZyDRRW-W6MAgLjn7DA/s220/profil+Ba%C5%9Fak+Foto%C4%9Fraf%C3%A7%C4%B1l%C4%B1k.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5628326400009361051.post-4916886490904504966</id><published>2025-03-02T13:08:00.002+03:00</published><updated>2025-03-02T13:08:28.106+03:00</updated><title type='text'>Mikroservislerde CQRS’in Faydaları</title><content type='html'>&lt;p data-end=&quot;409&quot; data-start=&quot;0&quot;&gt;&lt;strong data-end=&quot;8&quot; data-start=&quot;0&quot;&gt;CQRS&lt;/strong&gt; (Command Query Responsibility Segregation), mikroservislerde yazma (command) ve okuma (query) işlemlerini ayırarak büyük ölçekli ve karmaşık sistemlerde veri tutarlılığı, performans ve esneklik sağlar. CQRS’in mikroservislere nasıl fayda sağladığını anlamak için öncelikle bu deseni detaylı olarak ele alalım, ardından mikroservisler bağlamında nasıl çalıştığına dair bir örnek üzerinden açıklayalım.&lt;/p&gt;&lt;h3 data-end=&quot;430&quot; data-start=&quot;411&quot;&gt;&lt;strong data-end=&quot;430&quot; data-start=&quot;415&quot;&gt;CQRS Nedir?&lt;/strong&gt;&lt;/h3&gt;&lt;p data-end=&quot;536&quot; data-start=&quot;432&quot;&gt;CQRS, &quot;Komut&quot; (Command) ve &quot;Sorgu&quot; (Query) işlemlerini birbirinden ayıran bir yazılım tasarım desenidir.&lt;/p&gt;&lt;ul data-end=&quot;821&quot; data-start=&quot;538&quot;&gt;&lt;li data-end=&quot;688&quot; data-start=&quot;538&quot;&gt;&lt;strong data-end=&quot;559&quot; data-start=&quot;540&quot;&gt;Command (Komut)&lt;/strong&gt;: Veri değişiklikleri veya işlemlerini temsil eder (örneğin, veri ekleme, güncelleme, silme). Komutlar sistemde bir etki yaratır.&lt;/li&gt;&lt;li data-end=&quot;821&quot; data-start=&quot;689&quot;&gt;&lt;strong data-end=&quot;708&quot; data-start=&quot;691&quot;&gt;Query (Sorgu)&lt;/strong&gt;: Veri okuma işlemlerini temsil eder. Sorgular verileri okur ve geri döndürür, sistemde herhangi bir etki yapmaz.&lt;/li&gt;&lt;/ul&gt;&lt;p data-end=&quot;928&quot; data-start=&quot;823&quot;&gt;CQRS, bu iki tür işlemi ayırarak her birinin ayrı bir işlevsellik ve veri modeline sahip olmasını sağlar.&lt;/p&gt;&lt;h3 data-end=&quot;972&quot; data-start=&quot;930&quot;&gt;&lt;strong data-end=&quot;972&quot; data-start=&quot;934&quot;&gt;Mikroservislerde CQRS’in Faydaları&lt;/strong&gt;&lt;/h3&gt;&lt;h4 data-end=&quot;1022&quot; data-start=&quot;974&quot;&gt;1. &lt;strong data-end=&quot;1021&quot; data-start=&quot;982&quot;&gt;Veri Modeli Ayrımı ve Optimizasyonu&lt;/strong&gt;:&lt;/h4&gt;&lt;ul data-end=&quot;1821&quot; data-start=&quot;1026&quot;&gt;&lt;li data-end=&quot;1479&quot; data-start=&quot;1026&quot;&gt;&lt;strong data-end=&quot;1064&quot; data-start=&quot;1028&quot;&gt;Yazma ve Okuma Modelleri Ayrılır&lt;/strong&gt;: Yazma (command) işlemleri ve okuma (query) işlemleri için farklı veri modelleri kullanılabilir. Yazma işlemleri, genellikle veri tutarlılığını ve işlem bütünlüğünü sağlamak için daha karmaşık ve normalize edilmiş bir model gerektirirken, okuma işlemleri için denormalize edilmiş modeller kullanılabilir. Bu, &lt;strong data-end=&quot;1414&quot; data-start=&quot;1374&quot;&gt;okuma işlemlerinin hızını artırırken&lt;/strong&gt;, &lt;strong data-end=&quot;1438&quot; data-start=&quot;1416&quot;&gt;yazma işlemlerinin&lt;/strong&gt; daha tutarlı ve güvenli olmasını sağlar.&lt;/li&gt;&lt;li data-end=&quot;1821&quot; data-start=&quot;1483&quot;&gt;&lt;strong data-end=&quot;1494&quot; data-start=&quot;1485&quot;&gt;Örnek&lt;/strong&gt;: Bir e-ticaret uygulamasında, &quot;sipariş&quot; veri modeli, yazma için detaylıdır (müşteri bilgileri, ödeme bilgileri, ürünler, indirimler, vb.), ancak okuma için sadece müşteri adı, sipariş durumu ve toplam fiyat gibi daha basit alanlar yeterlidir. CQRS ile bu iki model ayrı tutulur, böylece okuma işlemleri daha hızlı yapılabilir.&lt;/li&gt;&lt;/ul&gt;&lt;h4 data-end=&quot;1860&quot; data-start=&quot;1823&quot;&gt;2. &lt;strong data-end=&quot;1859&quot; data-start=&quot;1831&quot;&gt;Performans İyileştirmesi&lt;/strong&gt;:&lt;/h4&gt;&lt;ul data-end=&quot;2402&quot; data-start=&quot;1864&quot;&gt;&lt;li data-end=&quot;2106&quot; data-start=&quot;1864&quot;&gt;&lt;strong data-end=&quot;1887&quot; data-start=&quot;1866&quot;&gt;Sorgu Performansı&lt;/strong&gt;: Okuma işlemleri için denormalize edilmiş veri yapıları kullanılabilir. Bu, sorguların daha hızlı ve daha verimli çalışmasını sağlar çünkü her okuma işlemi için tüm veri seti yerine sadece gerekli olan veri sorgulanır.&lt;/li&gt;&lt;li data-end=&quot;2402&quot; data-start=&quot;2110&quot;&gt;&lt;strong data-end=&quot;2121&quot; data-start=&quot;2112&quot;&gt;Örnek&lt;/strong&gt;: Bir &quot;sipariş&quot; tablosunda müşteri bilgileri ve sipariş kalemleri normalde aynı tabloda depolanabilir. Ancak, yalnızca siparişlerin durumu gerektiğinde sorgulanacaksa, okuma işlemi için yalnızca sipariş durumu ve müşteri bilgileri yer alan denormalize edilmiş bir model kullanılır.&lt;/li&gt;&lt;/ul&gt;&lt;h4 data-end=&quot;2434&quot; data-start=&quot;2404&quot;&gt;3. &lt;strong data-end=&quot;2433&quot; data-start=&quot;2412&quot;&gt;Ölçeklenebilirlik&lt;/strong&gt;:&lt;/h4&gt;&lt;ul data-end=&quot;2997&quot; data-start=&quot;2438&quot;&gt;&lt;li data-end=&quot;2709&quot; data-start=&quot;2438&quot;&gt;&lt;strong data-end=&quot;2500&quot; data-start=&quot;2440&quot;&gt;Yazma ve Okuma İhtiyaçları Ayrı Ayrı Ölçeklendirilebilir&lt;/strong&gt;: Yazma ve okuma işlemleri farklı hızda büyüyebilir. CQRS ile okuma ve yazma işlemleri için farklı sunucular veya hizmetler kullanılabilir. Bu, her iki işlemi de farklı derecelerde ölçeklendirme imkanı sağlar.&lt;/li&gt;&lt;li data-end=&quot;2997&quot; data-start=&quot;2713&quot;&gt;&lt;strong data-end=&quot;2724&quot; data-start=&quot;2715&quot;&gt;Örnek&lt;/strong&gt;: Bir sosyal medya platformunda, kullanıcılar sıkça içerik oluştururken, içerikler üzerinde yapılan sorgular (beğeni sayısı, yorumlar vb.) çok daha fazla olabilir. Okuma işlemleri yoğunluğu arttıkça, okuma hizmetleri ölçeklendirilebilirken, yazma işlemleri sabit kalabilir.&lt;/li&gt;&lt;/ul&gt;&lt;h4 data-end=&quot;3049&quot; data-start=&quot;2999&quot;&gt;4. &lt;strong data-end=&quot;3048&quot; data-start=&quot;3007&quot;&gt;Dağıtık İşlem ve Transaction Yönetimi&lt;/strong&gt;:&lt;/h4&gt;&lt;ul data-end=&quot;3620&quot; data-start=&quot;3053&quot;&gt;&lt;li data-end=&quot;3326&quot; data-start=&quot;3053&quot;&gt;&lt;strong data-end=&quot;3087&quot; data-start=&quot;3055&quot;&gt;SAGA Pattern ile Entegrasyon&lt;/strong&gt;: CQRS, &lt;strong data-end=&quot;3103&quot; data-start=&quot;3095&quot;&gt;SAGA&lt;/strong&gt; gibi dağıtık transaction yönetim desenleriyle uyumludur. Bu, mikroservisler arasında işlem yönetimini kolaylaştırır. SAGA, bir işlemde birden fazla adımı yöneten bir desendir ve her adım bir mikroservis tarafından işlenir.&lt;/li&gt;&lt;li data-end=&quot;3620&quot; data-start=&quot;3330&quot;&gt;&lt;strong data-end=&quot;3341&quot; data-start=&quot;3332&quot;&gt;Örnek&lt;/strong&gt;: Bir online ödeme sisteminde, ödeme işlemi birkaç mikroservisin katılımını gerektirir (sipariş oluşturma, ödeme onayı, kullanıcı hesap güncellemesi vb.). CQRS ile bu yazma işlemleri ayrı tutulabilir, ve bir hata durumunda işlem geri alınabilir (rollback) veya telafi edilebilir.&lt;/li&gt;&lt;/ul&gt;&lt;h4 data-end=&quot;3675&quot; data-start=&quot;3622&quot;&gt;5. &lt;strong data-end=&quot;3674&quot; data-start=&quot;3630&quot;&gt;Veri Tutarlılığı ve Eventual Consistency&lt;/strong&gt;:&lt;/h4&gt;&lt;ul data-end=&quot;4272&quot; data-start=&quot;3679&quot;&gt;&lt;li data-end=&quot;3983&quot; data-start=&quot;3679&quot;&gt;&lt;strong data-end=&quot;3714&quot; data-start=&quot;3681&quot;&gt;Eventual Consistency Sağlanır&lt;/strong&gt;: CQRS genellikle &lt;strong data-end=&quot;3750&quot; data-start=&quot;3732&quot;&gt;Event Sourcing&lt;/strong&gt; ile birlikte kullanılır. Event Sourcing, veri değişikliklerini olaylar olarak kaydeder. Bu olaylar, zaman içinde tüm mikroservislere iletilir ve veri tutarlılığı sağlanır. Bu, özellikle dağıtık sistemlerde önemli bir avantaj sağlar.&lt;/li&gt;&lt;li data-end=&quot;4272&quot; data-start=&quot;3987&quot;&gt;&lt;strong data-end=&quot;3998&quot; data-start=&quot;3989&quot;&gt;Örnek&lt;/strong&gt;: Bir ödeme yapıldığında, bu işlem bir &quot;Ödeme Başarılı&quot; olayı olarak kaydedilir. Bu olay, ödeme ile ilgili diğer mikroservislere iletilir (sipariş servisi, kullanıcı servisi, vb.) ve her servis kendi veri modelini günceller. Bu süreç sonunda veri tutarlılığı sağlanmış olur.&lt;/li&gt;&lt;/ul&gt;&lt;h3 data-end=&quot;4354&quot; data-start=&quot;4274&quot;&gt;&lt;strong data-end=&quot;4354&quot; data-start=&quot;4278&quot;&gt;CQRS’in Mikroservislere Sağladığı Faydaları Detaylı Bir Örnekle Açıklama&lt;/strong&gt;&lt;/h3&gt;&lt;p data-end=&quot;4474&quot; data-start=&quot;4356&quot;&gt;Diyelim ki bir &lt;strong data-end=&quot;4395&quot; data-start=&quot;4371&quot;&gt;e-ticaret uygulaması&lt;/strong&gt; geliştiriyorsunuz ve aşağıdaki mikroservislerden oluşan bir yapıya sahipsiniz:&lt;/p&gt;&lt;ol data-end=&quot;4679&quot; data-start=&quot;4475&quot;&gt;&lt;li data-end=&quot;4526&quot; data-start=&quot;4475&quot;&gt;&lt;strong data-end=&quot;4497&quot; data-start=&quot;4478&quot;&gt;Sipariş Servisi&lt;/strong&gt;: Sipariş verilerini yönetir.&lt;/li&gt;&lt;li data-end=&quot;4583&quot; data-start=&quot;4527&quot;&gt;&lt;strong data-end=&quot;4551&quot; data-start=&quot;4530&quot;&gt;Kullanıcı Servisi&lt;/strong&gt;: Kullanıcı bilgilerini yönetir.&lt;/li&gt;&lt;li data-end=&quot;4630&quot; data-start=&quot;4584&quot;&gt;&lt;strong data-end=&quot;4603&quot; data-start=&quot;4587&quot;&gt;Ürün Servisi&lt;/strong&gt;: Ürün bilgilerini yönetir.&lt;/li&gt;&lt;li data-end=&quot;4679&quot; data-start=&quot;4631&quot;&gt;&lt;strong data-end=&quot;4651&quot; data-start=&quot;4634&quot;&gt;Ödeme Servisi&lt;/strong&gt;: Ödeme işlemlerini yönetir.&lt;/li&gt;&lt;/ol&gt;&lt;h4 data-end=&quot;4716&quot; data-start=&quot;4681&quot;&gt;&lt;strong data-end=&quot;4715&quot; data-start=&quot;4686&quot;&gt;Komut (Command) İşlemleri&lt;/strong&gt;:&lt;/h4&gt;&lt;p data-end=&quot;5025&quot; data-start=&quot;4717&quot;&gt;Bir müşteri ürünleri sepete ekleyip ödeme yapmak istediğinde, bir &lt;strong data-end=&quot;4794&quot; data-start=&quot;4783&quot;&gt;sipariş&lt;/strong&gt; komutu oluşturulur. Bu komut, yazma işlemi olarak &lt;strong data-end=&quot;4864&quot; data-start=&quot;4845&quot;&gt;Sipariş Servisi&lt;/strong&gt; tarafından işlenir. Sipariş oluşturma, ödeme işlemi yapma ve kullanıcı bilgilerini güncelleme gibi tüm işlemler &lt;strong data-end=&quot;4988&quot; data-start=&quot;4977&quot;&gt;tutarlı&lt;/strong&gt; bir şekilde tek bir işlemde yapılır.&lt;/p&gt;&lt;ul data-end=&quot;5289&quot; data-start=&quot;5027&quot;&gt;&lt;li data-end=&quot;5151&quot; data-start=&quot;5027&quot;&gt;&lt;strong data-end=&quot;5047&quot; data-start=&quot;5029&quot;&gt;Ödeme Başarılı&lt;/strong&gt; olursa, bu işlem &lt;strong data-end=&quot;5084&quot; data-start=&quot;5065&quot;&gt;Sipariş Servisi&lt;/strong&gt;, &lt;strong data-end=&quot;5107&quot; data-start=&quot;5086&quot;&gt;Kullanıcı Servisi&lt;/strong&gt; ve &lt;strong data-end=&quot;5127&quot; data-start=&quot;5111&quot;&gt;Ürün Servisi&lt;/strong&gt; tarafından güncellenir.&lt;/li&gt;&lt;li data-end=&quot;5289&quot; data-start=&quot;5152&quot;&gt;&lt;strong data-end=&quot;5172&quot; data-start=&quot;5154&quot;&gt;Event Sourcing&lt;/strong&gt; kullanıyorsanız, bu ödeme olayı bir &lt;strong data-end=&quot;5229&quot; data-start=&quot;5209&quot;&gt;“Ödeme Başarılı”&lt;/strong&gt; olayı olarak kaydedilir ve diğer servisler bu olayı dinler.&lt;/li&gt;&lt;/ul&gt;&lt;h4 data-end=&quot;5324&quot; data-start=&quot;5291&quot;&gt;&lt;strong data-end=&quot;5323&quot; data-start=&quot;5296&quot;&gt;Sorgu (Query) İşlemleri&lt;/strong&gt;:&lt;/h4&gt;&lt;p data-end=&quot;5652&quot; data-start=&quot;5325&quot;&gt;Kullanıcılar, siparişlerini görmek istediklerinde, &lt;strong data-end=&quot;5393&quot; data-start=&quot;5376&quot;&gt;okuma (query)&lt;/strong&gt; işlemi yapılır. Okuma işlemi &lt;strong data-end=&quot;5442&quot; data-start=&quot;5423&quot;&gt;Sipariş Servisi&lt;/strong&gt; üzerinde gerçekleştirilir, ancak &lt;strong data-end=&quot;5511&quot; data-start=&quot;5476&quot;&gt;denormalize edilmiş veri modeli&lt;/strong&gt; kullanılır. Yalnızca kullanıcı adına, sipariş durumuna ve ürün fiyatlarına dair veriler sorgulanır, tüm detaylar yerine özet veriler alınır.&lt;/p&gt;&lt;p data-end=&quot;5708&quot; data-start=&quot;5654&quot;&gt;Bu sayede okuma işlemi çok daha hızlı ve verimli olur.&lt;/p&gt;&lt;h4 data-end=&quot;5762&quot; data-start=&quot;5710&quot;&gt;&lt;strong data-end=&quot;5761&quot; data-start=&quot;5715&quot;&gt;CQRS’in Mikroservislere Sağladığı Faydalar&lt;/strong&gt;:&lt;/h4&gt;&lt;ul data-end=&quot;6334&quot; data-start=&quot;5763&quot;&gt;&lt;li data-end=&quot;5978&quot; data-start=&quot;5763&quot;&gt;&lt;strong data-end=&quot;5786&quot; data-start=&quot;5765&quot;&gt;Ölçeklenebilirlik&lt;/strong&gt;: Sipariş işlemleri ve okuma işlemleri bağımsız olduğundan, okuma işleminde artan yoğunluğu karşılamak için &lt;strong data-end=&quot;5916&quot; data-start=&quot;5894&quot;&gt;okuma servislerini&lt;/strong&gt; daha fazla ölçeklendirebilirken, yazma işlemleri sabit kalır.&lt;/li&gt;&lt;li data-end=&quot;6155&quot; data-start=&quot;5979&quot;&gt;&lt;strong data-end=&quot;6001&quot; data-start=&quot;5981&quot;&gt;Veri Tutarlılığı&lt;/strong&gt;: Event Sourcing sayesinde, her mikroservisin güncel verilere erişmesini sağlarsınız. Hatalı bir işlem olursa, SAGA Pattern ile işlemi geri alabilirsiniz.&lt;/li&gt;&lt;li data-end=&quot;6334&quot; data-start=&quot;6156&quot;&gt;&lt;strong data-end=&quot;6172&quot; data-start=&quot;6158&quot;&gt;Performans&lt;/strong&gt;: Okuma ve yazma işlemlerinin ayrılması sayesinde, her iki işlem de optimize edilebilir. Okuma işlemleri için denormalize edilmiş, daha hızlı sorgular kullanılır.&lt;/li&gt;&lt;/ul&gt;&lt;h3 data-end=&quot;6350&quot; data-start=&quot;6336&quot;&gt;&lt;strong data-end=&quot;6349&quot; data-start=&quot;6340&quot;&gt;Sonuç&lt;/strong&gt;:&lt;/h3&gt;&lt;p data-end=&quot;6825&quot; data-is-last-node=&quot;&quot; data-is-only-node=&quot;&quot; data-start=&quot;6351&quot;&gt;CQRS, mikroservis mimarisinde &lt;strong data-end=&quot;6401&quot; data-start=&quot;6381&quot;&gt;işlem yönetimini&lt;/strong&gt;, &lt;strong data-end=&quot;6425&quot; data-start=&quot;6403&quot;&gt;veri tutarlılığını&lt;/strong&gt; ve &lt;strong data-end=&quot;6444&quot; data-start=&quot;6429&quot;&gt;performansı&lt;/strong&gt; iyileştiren güçlü bir yaklaşımdır. Yazma ve okuma işlemlerini ayırarak, her iki işlem için de daha verimli, ölçeklenebilir ve tutarlı bir yapı sağlanır. Event Sourcing ve SAGA gibi desenlerle entegrasyonu, dağıtık sistemlerde veri tutarlılığı ve işlem yönetimini kolaylaştırır. Bu, mikroservislerin başarısını artırır ve sistemin daha esnek ve yönetilebilir olmasına olanak tanır.&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://mehmetyoldas.blogspot.com/feeds/4916886490904504966/comments/default' title='Kayıt Yorumları'/><link rel='replies' type='text/html' href='http://mehmetyoldas.blogspot.com/2025/03/mikroservislerde-cqrsin-faydalar.html#comment-form' title='0 Yorum'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5628326400009361051/posts/default/4916886490904504966'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5628326400009361051/posts/default/4916886490904504966'/><link rel='alternate' type='text/html' href='http://mehmetyoldas.blogspot.com/2025/03/mikroservislerde-cqrsin-faydalar.html' title='Mikroservislerde CQRS’in Faydaları'/><author><name>Mehmet Yoldaş</name><uri>http://www.blogger.com/profile/17372934623166164299</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVw6x10V3awMwQJFzrhYEEvr-YMR-YcaKARcY29nS8Ny67irGfpUKqZ4uvXuwn6LQhPqNtJq5NQ4rkOE0x29vlgd4UNHA9D6B3uo8_D6VU7-5TZyDRRW-W6MAgLjn7DA/s220/profil+Ba%C5%9Fak+Foto%C4%9Fraf%C3%A7%C4%B1l%C4%B1k.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5628326400009361051.post-4583372591306075044</id><published>2025-03-02T12:58:00.001+03:00</published><updated>2025-03-02T12:58:15.754+03:00</updated><title type='text'>Microservice mimaride transaction yönetimi</title><content type='html'>&lt;p data-end=&quot;341&quot; data-start=&quot;0&quot;&gt;&lt;strong data-end=&quot;8&quot; data-start=&quot;0&quot;&gt;CQRS&lt;/strong&gt; (Command Query Responsibility Segregation), işlem (command) ve sorgu (query) işlemlerini birbirinden ayıran bir yazılım tasarım desenidir. Bu desen, mikroservislerde &lt;strong data-end=&quot;199&quot; data-start=&quot;175&quot;&gt;transaction yönetimi&lt;/strong&gt; ve &lt;strong data-end=&quot;223&quot; data-start=&quot;203&quot;&gt;veri tutarlılığı&lt;/strong&gt; konusunda önemli katkılar sağlar. İşte CQRS&#39;nin transaction yönetimine nasıl katkı sağladığına dair birkaç ana nokta:&lt;/p&gt;&lt;h3 data-end=&quot;376&quot; data-start=&quot;343&quot;&gt;1. &lt;strong data-end=&quot;375&quot; data-start=&quot;350&quot;&gt;Komut ve Sorgu Ayrımı&lt;/strong&gt;:&lt;/h3&gt;&lt;ul data-end=&quot;685&quot; data-start=&quot;380&quot;&gt;&lt;li data-end=&quot;568&quot; data-start=&quot;380&quot;&gt;&lt;strong data-end=&quot;405&quot; data-start=&quot;382&quot;&gt;Komutlar (Commands)&lt;/strong&gt;: Veritabanı üzerinde bir değişiklik (örneğin, ekleme, güncelleme, silme) gerçekleştiren işlemlerdir. Bu işlemler genellikle &lt;strong data-end=&quot;539&quot; data-start=&quot;530&quot;&gt;yazma&lt;/strong&gt; işlemleri olarak tanımlanır.&lt;/li&gt;&lt;li data-end=&quot;685&quot; data-start=&quot;572&quot;&gt;&lt;strong data-end=&quot;596&quot; data-start=&quot;574&quot;&gt;Sorgular (Queries)&lt;/strong&gt;: Veritabanından veri okuma işlemleridir ve sadece veri &lt;strong data-end=&quot;661&quot; data-start=&quot;652&quot;&gt;okuma&lt;/strong&gt; işlemlerini ifade eder.&lt;/li&gt;&lt;/ul&gt;&lt;p data-end=&quot;931&quot; data-start=&quot;687&quot;&gt;CQRS, bu iki işlemi birbirinden ayırarak, her birini farklı veri yapılarıyla yönetmenizi sağlar. Komutlar ve sorgular arasındaki ayrım, her bir işlevin farklı bir şekilde ele alınmasını sağlar ve transaction yönetimini daha etkili hale getirir.&lt;/p&gt;&lt;h3 data-end=&quot;979&quot; data-start=&quot;933&quot;&gt;2. &lt;strong data-end=&quot;978&quot; data-start=&quot;940&quot;&gt;Veritabanı ve Transaction Yönetimi&lt;/strong&gt;:&lt;/h3&gt;&lt;ul data-end=&quot;1612&quot; data-start=&quot;983&quot;&gt;&lt;li data-end=&quot;1373&quot; data-start=&quot;983&quot;&gt;&lt;strong data-end=&quot;1014&quot; data-start=&quot;985&quot;&gt;Yazma (Command) İşlemleri&lt;/strong&gt;: CQRS kullanıldığında, yazma işlemleri için genellikle tek bir veri modeline ve veritabanına odaklanılır. Bu model, genellikle veri değişikliklerinin tutarlı bir şekilde yönetilmesini sağlar.&lt;ul data-end=&quot;1373&quot; data-start=&quot;1212&quot;&gt;&lt;li data-end=&quot;1373&quot; data-start=&quot;1212&quot;&gt;Transaction işlemleri, yazma işlemleri için klasik ACID özelliklerini (Atomicity, Consistency, Isolation, Durability) sağlayarak, veritabanı bütünlüğünü korur.&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li data-end=&quot;1612&quot; data-start=&quot;1377&quot;&gt;&lt;strong data-end=&quot;1406&quot; data-start=&quot;1379&quot;&gt;Okuma (Query) İşlemleri&lt;/strong&gt;: Okuma işlemleri için veri modelini farklı bir yapıda optimize edebilirsiniz. Sorgulama için &lt;strong data-end=&quot;1537&quot; data-start=&quot;1500&quot;&gt;denormalize edilmiş veri yapıları&lt;/strong&gt; kullanılabilir, bu da okuma işlemlerinin hızlı ve verimli olmasını sağlar.&lt;/li&gt;&lt;/ul&gt;&lt;p data-end=&quot;1925&quot; data-start=&quot;1614&quot;&gt;&lt;strong data-end=&quot;1622&quot; data-start=&quot;1614&quot;&gt;CQRS&lt;/strong&gt;, yazma ve okuma işlemlerinin farklı veri yapılarına sahip olmasını ve bu sayede her bir işlemin daha bağımsız ve hızlı çalışmasını sağlar. Yazma ve okuma işlemleri farklı veritabanlarında veya veri modellerinde yapılabilir, böylece &lt;strong data-end=&quot;1876&quot; data-start=&quot;1855&quot;&gt;işlem tutarlılığı&lt;/strong&gt; sağlanırken &lt;strong data-end=&quot;1910&quot; data-start=&quot;1889&quot;&gt;okuma performansı&lt;/strong&gt; artırılabilir.&lt;/p&gt;&lt;h3 data-end=&quot;1969&quot; data-start=&quot;1927&quot;&gt;3. &lt;strong data-end=&quot;1968&quot; data-start=&quot;1934&quot;&gt;Event Sourcing ile Entegrasyon&lt;/strong&gt;:&lt;/h3&gt;&lt;p data-end=&quot;2306&quot; data-start=&quot;1973&quot;&gt;CQRS, çoğu zaman &lt;strong data-end=&quot;2008&quot; data-start=&quot;1990&quot;&gt;Event Sourcing&lt;/strong&gt; ile birlikte kullanılır. Event Sourcing, her işlemi bir olay olarak kaydeder. Yani, bir veri değişikliği olduğunda, bu değişiklik veritabanına doğrudan yazılmak yerine bir olay (event) olarak kaydedilir. Bu olaylar daha sonra birden fazla servise iletilir ve bu olaylar üzerinden veri güncellenir.&lt;/p&gt;&lt;ul data-end=&quot;2874&quot; data-start=&quot;2311&quot;&gt;&lt;li data-end=&quot;2617&quot; data-start=&quot;2311&quot;&gt;&lt;strong data-end=&quot;2337&quot; data-start=&quot;2313&quot;&gt;Transaction Yönetimi&lt;/strong&gt;: Event Sourcing, bir işlem sırasında oluşan her olayı takip eder ve bu olaylar, sistemdeki her değişikliği kaydeder. Bu, mikroservislerdeki dağıtık işlemler için &lt;strong data-end=&quot;2514&quot; data-start=&quot;2500&quot;&gt;tutarlılık&lt;/strong&gt; sağlar çünkü tüm servisler aynı olayları paylaşır ve sistemdeki her değişiklik, bir olayla tetiklenir.&lt;/li&gt;&lt;li data-end=&quot;2874&quot; data-start=&quot;2621&quot;&gt;&lt;strong data-end=&quot;2647&quot; data-start=&quot;2623&quot;&gt;Eventual Consistency&lt;/strong&gt;: CQRS ile birlikte &lt;strong data-end=&quot;2691&quot; data-start=&quot;2667&quot;&gt;eventual consistency&lt;/strong&gt; (sonunda tutarlılık) sağlanabilir. Yani, her ne kadar sistemde ilk etapta veri tutarsız olsa da, zaman içinde tüm servisler ve veritabanları güncellenerek nihai tutarlılığa ulaşılır.&lt;/li&gt;&lt;/ul&gt;&lt;h3 data-end=&quot;2916&quot; data-start=&quot;2876&quot;&gt;4. &lt;strong data-end=&quot;2915&quot; data-start=&quot;2883&quot;&gt;Dağıtık Transaction Yönetimi&lt;/strong&gt;:&lt;/h3&gt;&lt;p data-end=&quot;3218&quot; data-start=&quot;2920&quot;&gt;Mikroservislerde dağıtık işlemler yönetilirken, her servis kendi veri modeline ve veritabanına sahiptir. Bu nedenle &lt;strong data-end=&quot;3068&quot; data-start=&quot;3036&quot;&gt;dağıtık transaction yönetimi&lt;/strong&gt; genellikle zordur. CQRS, her servis için ayrı yazma ve okuma modelleri sunduğunda, dağıtık işlemlerin daha verimli bir şekilde yönetilmesini sağlar.&lt;/p&gt;&lt;ul data-end=&quot;3638&quot; data-start=&quot;3223&quot;&gt;&lt;li data-end=&quot;3638&quot; data-start=&quot;3223&quot;&gt;&lt;strong data-end=&quot;3257&quot; data-start=&quot;3225&quot;&gt;SAGA Pattern ile Entegrasyon&lt;/strong&gt;: CQRS, &lt;strong data-end=&quot;3281&quot; data-start=&quot;3265&quot;&gt;SAGA Pattern&lt;/strong&gt; ile de entegre edilebilir. SAGA, dağıtık işlemleri yöneten bir desendir ve her bir işlem bir dizi bağımsız adımda gerçekleşir. SAGA, işlem adımlarını başarılı bir şekilde yönetirken her servisin kendi veritabanında işlem yapmasını sağlar. Bu, bir servis hata aldığında diğer servislerin işlemeyi iptal etmesine olanak tanır, böylece &lt;strong data-end=&quot;3629&quot; data-start=&quot;3615&quot;&gt;tutarlılık&lt;/strong&gt; korunur.&lt;/li&gt;&lt;/ul&gt;&lt;h3 data-end=&quot;3684&quot; data-start=&quot;3640&quot;&gt;5. &lt;strong data-end=&quot;3683&quot; data-start=&quot;3647&quot;&gt;Transactionlar Arası Bağımsızlık&lt;/strong&gt;:&lt;/h3&gt;&lt;p data-end=&quot;3904&quot; data-start=&quot;3688&quot;&gt;CQRS, yazma ve okuma işlemleri için farklı veri yapıları kullandığı için, her iki işlem de bağımsız şekilde yönetilebilir. Bu bağımsızlık, &lt;strong data-end=&quot;3853&quot; data-start=&quot;3827&quot;&gt;transactional boundary&lt;/strong&gt;&#39;lerin net bir şekilde tanımlanmasına olanak tanır:&lt;/p&gt;&lt;ul data-end=&quot;4147&quot; data-start=&quot;3908&quot;&gt;&lt;li data-end=&quot;3989&quot; data-start=&quot;3908&quot;&gt;&lt;strong data-end=&quot;3929&quot; data-start=&quot;3910&quot;&gt;Yazma işlemleri&lt;/strong&gt; (komutlar) &lt;strong data-end=&quot;3978&quot; data-start=&quot;3941&quot;&gt;veritabanında tutarlı bir şekilde&lt;/strong&gt; yönetilir.&lt;/li&gt;&lt;li data-end=&quot;4147&quot; data-start=&quot;3993&quot;&gt;&lt;strong data-end=&quot;4014&quot; data-start=&quot;3995&quot;&gt;Okuma işlemleri&lt;/strong&gt; (sorgular) &lt;strong data-end=&quot;4066&quot; data-start=&quot;4026&quot;&gt;denormalize edilmiş veri yapılarıyla&lt;/strong&gt; yapılır, bu da performansı artırırken yazma işlemlerinin etkisini minimize eder.&lt;/li&gt;&lt;/ul&gt;&lt;h3 data-end=&quot;4192&quot; data-start=&quot;4149&quot;&gt;6. &lt;strong data-end=&quot;4191&quot; data-start=&quot;4156&quot;&gt;Performans ve Ölçeklenebilirlik&lt;/strong&gt;:&lt;/h3&gt;&lt;p data-end=&quot;4490&quot; data-start=&quot;4196&quot;&gt;CQRS, yazma ve okuma işlemlerini ayrı tutarak, her iki işlem türü üzerinde farklı performans iyileştirmeleri yapılmasına olanak tanır. Yazma işlemleri için &lt;strong data-end=&quot;4376&quot; data-start=&quot;4352&quot;&gt;transaction yönetimi&lt;/strong&gt; ve &lt;strong data-end=&quot;4400&quot; data-start=&quot;4380&quot;&gt;veri tutarlılığı&lt;/strong&gt; sağlanırken, okuma işlemleri için daha hızlı ve optimize edilmiş sorgular kullanılabilir.&lt;/p&gt;&lt;h3 data-end=&quot;4501&quot; data-start=&quot;4492&quot;&gt;Özet:&lt;/h3&gt;&lt;ul data-end=&quot;5043&quot; data-start=&quot;4502&quot;&gt;&lt;li data-end=&quot;4622&quot; data-start=&quot;4502&quot;&gt;&lt;strong data-end=&quot;4512&quot; data-start=&quot;4504&quot;&gt;CQRS&lt;/strong&gt;, yazma ve okuma işlemlerini ayırarak mikroservislerde transaction yönetimini daha yönetilebilir hale getirir.&lt;/li&gt;&lt;li data-end=&quot;4728&quot; data-start=&quot;4623&quot;&gt;Yazma işlemleri, &lt;strong data-end=&quot;4650&quot; data-start=&quot;4642&quot;&gt;ACID&lt;/strong&gt; özellikleriyle &lt;strong data-end=&quot;4692&quot; data-start=&quot;4666&quot;&gt;transaction yönetimini&lt;/strong&gt; sağlar ve veri tutarlılığını korur.&lt;/li&gt;&lt;li data-end=&quot;4915&quot; data-start=&quot;4729&quot;&gt;&lt;strong data-end=&quot;4749&quot; data-start=&quot;4731&quot;&gt;Event Sourcing&lt;/strong&gt; ile birlikte kullanıldığında, sistemdeki her değişiklik bir &lt;strong data-end=&quot;4826&quot; data-start=&quot;4810&quot;&gt;olay (event)&lt;/strong&gt; olarak kaydedilir ve mikroservisler arasındaki dağıtık işlemler daha tutarlı hale gelir.&lt;/li&gt;&lt;li data-end=&quot;5043&quot; data-start=&quot;4916&quot;&gt;&lt;strong data-end=&quot;4934&quot; data-start=&quot;4918&quot;&gt;SAGA Pattern&lt;/strong&gt; gibi deseni ile dağıtık işlemler yönetilerek, &lt;strong data-end=&quot;5001&quot; data-start=&quot;4981&quot;&gt;veri tutarlılığı&lt;/strong&gt; ve &lt;strong data-end=&quot;5029&quot; data-start=&quot;5005&quot;&gt;transaction yönetimi&lt;/strong&gt; sağlanabilir.&lt;/li&gt;&lt;/ul&gt;&lt;p data-end=&quot;5221&quot; data-is-last-node=&quot;&quot; data-is-only-node=&quot;&quot; data-start=&quot;5045&quot;&gt;Bu sayede, CQRS, mikroservislerde veritabanı bütünlüğü ve tutarlılığını sağlamada önemli bir rol oynar ve dağıtık sistemlerde performansı artırarak daha verimli bir yapı sunar.&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://mehmetyoldas.blogspot.com/feeds/4583372591306075044/comments/default' title='Kayıt Yorumları'/><link rel='replies' type='text/html' href='http://mehmetyoldas.blogspot.com/2025/03/microservice-mimaride-transaction.html#comment-form' title='0 Yorum'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5628326400009361051/posts/default/4583372591306075044'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5628326400009361051/posts/default/4583372591306075044'/><link rel='alternate' type='text/html' href='http://mehmetyoldas.blogspot.com/2025/03/microservice-mimaride-transaction.html' title='Microservice mimaride transaction yönetimi'/><author><name>Mehmet Yoldaş</name><uri>http://www.blogger.com/profile/17372934623166164299</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVw6x10V3awMwQJFzrhYEEvr-YMR-YcaKARcY29nS8Ny67irGfpUKqZ4uvXuwn6LQhPqNtJq5NQ4rkOE0x29vlgd4UNHA9D6B3uo8_D6VU7-5TZyDRRW-W6MAgLjn7DA/s220/profil+Ba%C5%9Fak+Foto%C4%9Fraf%C3%A7%C4%B1l%C4%B1k.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5628326400009361051.post-4526267457380985692</id><published>2025-03-02T12:55:00.006+03:00</published><updated>2025-03-02T12:55:53.260+03:00</updated><title type='text'>Mikroservisler mimarisinde, veritabanı yapısı ve veri bütünlüğü nasıl olmalı?</title><content type='html'>&lt;p&gt;&amp;nbsp;Mikroservisler mimarisinde, &lt;strong data-end=&quot;49&quot; data-start=&quot;28&quot;&gt;veritabanı yapısı&lt;/strong&gt; ve &lt;strong data-end=&quot;71&quot; data-start=&quot;53&quot;&gt;veri bütünlüğü&lt;/strong&gt; konuları önemli zorluklar oluşturur çünkü her mikroservis genellikle kendi bağımsız veritabanına sahip olur. Bu, &lt;strong data-end=&quot;209&quot; data-start=&quot;185&quot;&gt;veritabanı bölünmesi&lt;/strong&gt; (database per service) olarak bilinir ve mikroservislerin esnekliğini artırırken, aynı zamanda veri tutarlılığı ve bütünlüğü sağlamayı zorlaştırır.&lt;/p&gt;&lt;h3 data-end=&quot;388&quot; data-start=&quot;359&quot;&gt;1. &lt;strong data-end=&quot;387&quot; data-start=&quot;366&quot;&gt;Veritabanı Yapısı&lt;/strong&gt;:&lt;/h3&gt;&lt;ul data-end=&quot;913&quot; data-start=&quot;392&quot;&gt;&lt;li data-end=&quot;691&quot; data-start=&quot;392&quot;&gt;&lt;strong data-end=&quot;421&quot; data-start=&quot;394&quot;&gt;Veritabanı Bağımsızlığı&lt;/strong&gt;: Her mikroservis kendi veritabanına sahip olmalıdır. Bu, mikroservislerin bağımsız olmasını sağlar ve her biri farklı türde veritabanları (SQL veya NoSQL) kullanabilir. Örneğin, bir servis &lt;strong data-end=&quot;625&quot; data-start=&quot;611&quot;&gt;PostgreSQL&lt;/strong&gt; kullanabilir, diğeri &lt;strong data-end=&quot;658&quot; data-start=&quot;647&quot;&gt;MongoDB&lt;/strong&gt; veya &lt;strong data-end=&quot;677&quot; data-start=&quot;664&quot;&gt;Cassandra&lt;/strong&gt; kullanabilir.&lt;/li&gt;&lt;li data-end=&quot;913&quot; data-start=&quot;695&quot;&gt;&lt;strong data-end=&quot;725&quot; data-start=&quot;697&quot;&gt;Veri Modeli Bağımsızlığı&lt;/strong&gt;: Mikroservisler bağımsız olduğunda, her biri kendi veri modelini tasarlayabilir. Bu, her mikroservisin ihtiyaçlarına özel ve optimize edilmiş veri modelleri geliştirilmesine olanak tanır.&lt;/li&gt;&lt;/ul&gt;&lt;h3 data-end=&quot;955&quot; data-start=&quot;915&quot;&gt;2. &lt;strong data-end=&quot;954&quot; data-start=&quot;922&quot;&gt;Veri Bütünlüğü ve Tutarlılık&lt;/strong&gt;:&lt;/h3&gt;&lt;p data-end=&quot;1314&quot; data-start=&quot;959&quot;&gt;Mikroservislerde, verilerin tutarlılığını sağlamak için bazı yöntemler kullanılabilir. Ancak, merkezi bir veritabanı yerine bağımsız veritabanları kullanıldığı için &lt;strong data-end=&quot;1180&quot; data-start=&quot;1124&quot;&gt;ACID (Atomicity, Consistency, Isolation, Durability)&lt;/strong&gt; garantileri sağlamak zordur. Bunun yerine, daha fazla &lt;strong data-end=&quot;1259&quot; data-start=&quot;1235&quot;&gt;eventual consistency&lt;/strong&gt; (sonunda tutarlılık) yaklaşımına yönelmek gerekebilir.&lt;/p&gt;&lt;h4 data-end=&quot;1370&quot; data-start=&quot;1316&quot;&gt;a. &lt;strong data-end=&quot;1369&quot; data-start=&quot;1324&quot;&gt;Eventual Consistency (Sonunda Tutarlılık)&lt;/strong&gt;:&lt;/h4&gt;&lt;p data-end=&quot;1599&quot; data-start=&quot;1374&quot;&gt;Mikroservisler arasındaki veri bütünlüğünü sağlamak için &lt;strong data-end=&quot;1455&quot; data-start=&quot;1431&quot;&gt;eventual consistency&lt;/strong&gt; modelini kullanabilirsiniz. Bu modelde, veriler başlangıçta tutarsız olabilir, ancak zaman içinde sistemdeki tüm bileşenler tutarlı hale gelir.&lt;/p&gt;&lt;ul data-end=&quot;2032&quot; data-start=&quot;1607&quot;&gt;&lt;li data-end=&quot;1834&quot; data-start=&quot;1607&quot;&gt;&lt;strong data-end=&quot;1638&quot; data-start=&quot;1609&quot;&gt;Event-driven Architecture&lt;/strong&gt;: Mikroservisler arasındaki veri paylaşımı için olay tabanlı sistemler kullanılır. Bir mikroservis, bir işlem tamamlandığında bir &lt;strong data-end=&quot;1777&quot; data-start=&quot;1768&quot;&gt;event&lt;/strong&gt; (olay) yayınlar ve diğer mikroservisler bu olayı dinler.&lt;/li&gt;&lt;li data-end=&quot;2032&quot; data-start=&quot;1838&quot;&gt;&lt;strong data-end=&quot;1858&quot; data-start=&quot;1840&quot;&gt;Event Sourcing&lt;/strong&gt;: Herhangi bir değişiklik, sistemdeki bir olay (event) olarak kaydedilir. Bu olaylar, veri tutarlılığını sağlamak için diğer servisler tarafından dinlenebilir ve işlenebilir.&lt;/li&gt;&lt;/ul&gt;&lt;h4 data-end=&quot;2059&quot; data-start=&quot;2034&quot;&gt;b. &lt;strong data-end=&quot;2058&quot; data-start=&quot;2042&quot;&gt;SAGA Pattern&lt;/strong&gt;:&lt;/h4&gt;&lt;p data-end=&quot;2282&quot; data-start=&quot;2063&quot;&gt;SAGA, mikroservisler arasında &lt;strong data-end=&quot;2113&quot; data-start=&quot;2093&quot;&gt;dağıtık işlemler&lt;/strong&gt; için bir &lt;strong data-end=&quot;2147&quot; data-start=&quot;2123&quot;&gt;işlem yönetim deseni&lt;/strong&gt; sunar. Birden fazla mikroservis arasında işlemler yapılırken tutarlılığı sağlamak için kullanılabilir. SAGA, iki ana yaklaşımı içerir:&lt;/p&gt;&lt;ul data-end=&quot;2647&quot; data-start=&quot;2290&quot;&gt;&lt;li data-end=&quot;2454&quot; data-start=&quot;2290&quot;&gt;&lt;strong data-end=&quot;2308&quot; data-start=&quot;2292&quot;&gt;Choreography&lt;/strong&gt;: Her servis, başarılı veya başarısız bir işlemin ardından bir olay yayınlar ve diğer servisler bu olayı dinler ve uygun işlemleri gerçekleştirir.&lt;/li&gt;&lt;li data-end=&quot;2647&quot; data-start=&quot;2458&quot;&gt;&lt;strong data-end=&quot;2477&quot; data-start=&quot;2460&quot;&gt;Orchestration&lt;/strong&gt;: Bir merkezi &lt;strong data-end=&quot;2512&quot; data-start=&quot;2491&quot;&gt;Saga Orchestrator&lt;/strong&gt; servis tarafından işlem akışı yönetilir. Bu servis, işlem sırasını koordine eder ve her bir mikroservisin nasıl işleyeceğini belirler.&lt;/li&gt;&lt;/ul&gt;&lt;h4 data-end=&quot;2682&quot; data-start=&quot;2649&quot;&gt;c. &lt;strong data-end=&quot;2681&quot; data-start=&quot;2657&quot;&gt;2 Phase Commit (2PC)&lt;/strong&gt;:&lt;/h4&gt;&lt;p data-end=&quot;3135&quot; data-start=&quot;2686&quot;&gt;Mikroservisler arasında veritabanı bütünlüğünü sağlamak için &lt;strong data-end=&quot;2765&quot; data-start=&quot;2747&quot;&gt;2 Phase Commit&lt;/strong&gt; (İki Aşamalı Taahhüt) protokolü kullanılabilir. Ancak, bu yöntem mikroservislerde genellikle kullanılmaz çünkü &lt;strong data-end=&quot;2897&quot; data-start=&quot;2877&quot;&gt;dağıtık işlemler&lt;/strong&gt; üzerinde yüksek performans ve esneklik gereksinimlerine hitap etmez. 2PC, birden fazla mikroservisin işlem sırasına göre tüm adımlarının başarılı olmasını sağlar, ancak zaman içinde kilitlenmeler veya performans sorunlarına yol açabilir.&lt;/p&gt;&lt;h3 data-end=&quot;3188&quot; data-start=&quot;3137&quot;&gt;3. &lt;strong data-end=&quot;3187&quot; data-start=&quot;3144&quot;&gt;Transaction Management (İşlem Yönetimi)&lt;/strong&gt;:&lt;/h3&gt;&lt;p data-end=&quot;3365&quot; data-start=&quot;3189&quot;&gt;Mikroservislerde &lt;strong data-end=&quot;3223&quot; data-start=&quot;3206&quot;&gt;tek bir işlem&lt;/strong&gt; (transaction) genellikle birden fazla servisi kapsayamaz. Ancak, &lt;strong data-end=&quot;3319&quot; data-start=&quot;3289&quot;&gt;distribüt edilmiş işlemler&lt;/strong&gt; için farklı desenler ve teknikler kullanılır:&lt;/p&gt;&lt;h4 data-end=&quot;3404&quot; data-start=&quot;3367&quot;&gt;a. &lt;strong data-end=&quot;3403&quot; data-start=&quot;3375&quot;&gt;Distributed Transactions&lt;/strong&gt;:&lt;/h4&gt;&lt;ul data-end=&quot;3701&quot; data-start=&quot;3408&quot;&gt;&lt;li data-end=&quot;3607&quot; data-start=&quot;3408&quot;&gt;&lt;strong data-end=&quot;3436&quot; data-start=&quot;3410&quot;&gt;Two-Phase Commit (2PC)&lt;/strong&gt;: Geleneksel bir işlem protokolü, ancak mikroservislerde çok az tercih edilir. Servislerin bağımsız çalışmasını engelleyebilir ve veritabanı kilitlenmelerine yol açabilir.&lt;/li&gt;&lt;li data-end=&quot;3701&quot; data-start=&quot;3611&quot;&gt;&lt;strong data-end=&quot;3629&quot; data-start=&quot;3613&quot;&gt;SAGA Pattern&lt;/strong&gt;: Dağıtık işlemler ve transaction yönetimi için daha uygun bir çözümdür.&lt;/li&gt;&lt;/ul&gt;&lt;h4 data-end=&quot;3736&quot; data-start=&quot;3703&quot;&gt;b. &lt;strong data-end=&quot;3735&quot; data-start=&quot;3711&quot;&gt;Transactional Outbox&lt;/strong&gt;:&lt;/h4&gt;&lt;ul data-end=&quot;4000&quot; data-start=&quot;3740&quot;&gt;&lt;li data-end=&quot;3996&quot; data-start=&quot;3740&quot;&gt;Bu desen, mikroservislerde işlemlerle ilişkili olayları yönetmek için kullanılır. Bir servis, veritabanı işlemini tamamladıktan sonra bir &quot;outbox&quot; tablosuna olay (event) kaydeder. Ardından bir &quot;event handler&quot; bu olayı alır ve ilgili servisleri günceller.&lt;/li&gt;&lt;/ul&gt;&lt;h4 data-end=&quot;4061&quot; data-start=&quot;4001&quot;&gt;c. &lt;strong data-end=&quot;4060&quot; data-start=&quot;4009&quot;&gt;CQRS (Command Query Responsibility Segregation)&lt;/strong&gt;:&lt;/h4&gt;&lt;ul data-end=&quot;4367&quot; data-start=&quot;4065&quot;&gt;&lt;li data-end=&quot;4367&quot; data-start=&quot;4065&quot;&gt;Mikroservislerin okuma ve yazma işlemlerini ayırarak veritabanı işlemlerinin tutarlılığını sağlar. Yazma işlemleri (commands) farklı veri modelleriyle yapılırken, okuma işlemleri (queries) farklı bir veri modeline sahip olabilir. Bu, performansı artırırken tutarlılığı da sağlamada yardımcı olabilir.&lt;/li&gt;&lt;/ul&gt;&lt;h3 data-end=&quot;4403&quot; data-start=&quot;4369&quot;&gt;4. &lt;strong data-end=&quot;4402&quot; data-start=&quot;4376&quot;&gt;Veritabanı Tutarlılığı&lt;/strong&gt;:&lt;/h3&gt;&lt;p data-end=&quot;4495&quot; data-start=&quot;4407&quot;&gt;Mikroservislerde, veri tutarlılığını sağlamak için aşağıdaki yaklaşımlar kullanılabilir:&lt;/p&gt;&lt;ul data-end=&quot;4920&quot; data-start=&quot;4503&quot;&gt;&lt;li data-end=&quot;4607&quot; data-start=&quot;4503&quot;&gt;&lt;strong data-end=&quot;4523&quot; data-start=&quot;4505&quot;&gt;Event Sourcing&lt;/strong&gt;: Veritabanı durumu yerine, işlemlerin sırasını kaydeden olaylar üzerinden çalışmak.&lt;/li&gt;&lt;li data-end=&quot;4805&quot; data-start=&quot;4611&quot;&gt;&lt;strong data-end=&quot;4632&quot; data-start=&quot;4613&quot;&gt;Denormalization&lt;/strong&gt;: Veritabanı yapısını, servislerin hızlıca erişebileceği şekilde &lt;strong data-end=&quot;4712&quot; data-start=&quot;4697&quot;&gt;denormalize&lt;/strong&gt; etmek. Bu, mikroservislerin birbirlerinden bağımsız olarak veri okumalarını hızlandırabilir.&lt;/li&gt;&lt;li data-end=&quot;4920&quot; data-start=&quot;4809&quot;&gt;&lt;strong data-end=&quot;4843&quot; data-start=&quot;4811&quot;&gt;Saga ve Eventual Consistency&lt;/strong&gt;: Dağıtık işlemler için &lt;strong data-end=&quot;4875&quot; data-start=&quot;4867&quot;&gt;SAGA&lt;/strong&gt; deseni ve &lt;strong data-end=&quot;4910&quot; data-start=&quot;4886&quot;&gt;eventual consistency&lt;/strong&gt; sağlamak.&lt;/li&gt;&lt;/ul&gt;&lt;h3 data-end=&quot;4931&quot; data-start=&quot;4922&quot;&gt;Özet:&lt;/h3&gt;&lt;ul data-end=&quot;5395&quot; data-start=&quot;4932&quot;&gt;&lt;li data-end=&quot;5088&quot; data-start=&quot;4932&quot;&gt;Mikroservisler, genellikle &lt;strong data-end=&quot;4989&quot; data-start=&quot;4961&quot;&gt;bağımsız veritabanlarına&lt;/strong&gt; sahip olurlar ve bu durum &lt;strong data-end=&quot;5036&quot; data-start=&quot;5016&quot;&gt;veri tutarlılığı&lt;/strong&gt; ve &lt;strong data-end=&quot;5053&quot; data-start=&quot;5040&quot;&gt;bütünlüğü&lt;/strong&gt; konularında zorluklar yaratabilir.&lt;/li&gt;&lt;li data-end=&quot;5253&quot; data-start=&quot;5089&quot;&gt;&lt;strong data-end=&quot;5115&quot; data-start=&quot;5091&quot;&gt;Eventual consistency&lt;/strong&gt;, &lt;strong data-end=&quot;5133&quot; data-start=&quot;5117&quot;&gt;SAGA Pattern&lt;/strong&gt; ve &lt;strong data-end=&quot;5155&quot; data-start=&quot;5137&quot;&gt;Event Sourcing&lt;/strong&gt; gibi desenler, veri tutarlılığını sağlamak için mikroservis mimarisinde yaygın olarak kullanılır.&lt;/li&gt;&lt;li data-end=&quot;5395&quot; data-start=&quot;5254&quot;&gt;&lt;strong data-end=&quot;5276&quot; data-start=&quot;5256&quot;&gt;Dağıtık işlemler&lt;/strong&gt; ve &lt;strong data-end=&quot;5297&quot; data-start=&quot;5280&quot;&gt;veri yönetimi&lt;/strong&gt; için geleneksel ACID garantilerinden farklı, daha esnek ve ölçeklenebilir çözümler tercih edilir.&lt;/li&gt;&lt;/ul&gt;&lt;p data-end=&quot;5530&quot; data-is-last-node=&quot;&quot; data-is-only-node=&quot;&quot; data-start=&quot;5397&quot;&gt;Bu konular, mikroservis mimarisinin temel taşlarıdır ve mikroservislerin başarılı bir şekilde yönetilmesi için kritik öneme sahiptir.&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://mehmetyoldas.blogspot.com/feeds/4526267457380985692/comments/default' title='Kayıt Yorumları'/><link rel='replies' type='text/html' href='http://mehmetyoldas.blogspot.com/2025/03/mikroservisler-mimarisinde-veritaban.html#comment-form' title='0 Yorum'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5628326400009361051/posts/default/4526267457380985692'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5628326400009361051/posts/default/4526267457380985692'/><link rel='alternate' type='text/html' href='http://mehmetyoldas.blogspot.com/2025/03/mikroservisler-mimarisinde-veritaban.html' title='Mikroservisler mimarisinde, veritabanı yapısı ve veri bütünlüğü nasıl olmalı?'/><author><name>Mehmet Yoldaş</name><uri>http://www.blogger.com/profile/17372934623166164299</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVw6x10V3awMwQJFzrhYEEvr-YMR-YcaKARcY29nS8Ny67irGfpUKqZ4uvXuwn6LQhPqNtJq5NQ4rkOE0x29vlgd4UNHA9D6B3uo8_D6VU7-5TZyDRRW-W6MAgLjn7DA/s220/profil+Ba%C5%9Fak+Foto%C4%9Fraf%C3%A7%C4%B1l%C4%B1k.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5628326400009361051.post-690730318950997783</id><published>2025-03-02T12:53:00.003+03:00</published><updated>2025-03-02T12:53:50.760+03:00</updated><title type='text'>Mikroservis Mimarisi nedir?</title><content type='html'>&lt;p&gt;&amp;nbsp;Mikroservisler, yazılım uygulamalarını bağımsız ve küçük servisler olarak tasarlamak için kullanılan bir mimari yaklaşımdır. Mikroservislerle ilgili bilmen gereken en önemli bilgiler şunlardır:&lt;/p&gt;&lt;h3 data-end=&quot;227&quot; data-start=&quot;195&quot;&gt;1. &lt;strong data-end=&quot;226&quot; data-start=&quot;202&quot;&gt;Mikroservis Mimarisi&lt;/strong&gt;:&lt;/h3&gt;&lt;ul data-end=&quot;514&quot; data-start=&quot;231&quot;&gt;&lt;li data-end=&quot;339&quot; data-start=&quot;231&quot;&gt;&lt;strong data-end=&quot;255&quot; data-start=&quot;233&quot;&gt;Bağımsız Servisler&lt;/strong&gt;: Uygulama, her biri belirli bir işlevi yerine getiren bağımsız servislerden oluşur.&lt;/li&gt;&lt;li data-end=&quot;514&quot; data-start=&quot;343&quot;&gt;&lt;strong data-end=&quot;365&quot; data-start=&quot;345&quot;&gt;Düşük Bağımlılık&lt;/strong&gt;: Her servis, kendi veri yönetimi ve işlevselliğiyle bağımsız çalışır, böylece bir servis diğerini etkilemeden güncellenebilir veya değiştirilebilir.&lt;/li&gt;&lt;/ul&gt;&lt;h3 data-end=&quot;538&quot; data-start=&quot;516&quot;&gt;2. &lt;strong data-end=&quot;537&quot; data-start=&quot;523&quot;&gt;Avantajlar&lt;/strong&gt;:&lt;/h3&gt;&lt;ul data-end=&quot;871&quot; data-start=&quot;542&quot;&gt;&lt;li data-end=&quot;614&quot; data-start=&quot;542&quot;&gt;&lt;strong data-end=&quot;565&quot; data-start=&quot;544&quot;&gt;Ölçeklenebilirlik&lt;/strong&gt;: Her mikroservis bağımsız olarak ölçeklenebilir.&lt;/li&gt;&lt;li data-end=&quot;693&quot; data-start=&quot;618&quot;&gt;&lt;strong data-end=&quot;632&quot; data-start=&quot;620&quot;&gt;Esneklik&lt;/strong&gt;: Farklı teknolojilerle yazılabilir (Java, .NET, Python vb.).&lt;/li&gt;&lt;li data-end=&quot;795&quot; data-start=&quot;697&quot;&gt;&lt;strong data-end=&quot;718&quot; data-start=&quot;699&quot;&gt;Geliştirme Hızı&lt;/strong&gt;: Küçük ve bağımsız ekipler, farklı servisleri paralel olarak geliştirebilir.&lt;/li&gt;&lt;li data-end=&quot;871&quot; data-start=&quot;799&quot;&gt;&lt;strong data-end=&quot;820&quot; data-start=&quot;801&quot;&gt;Hata İzolasyonu&lt;/strong&gt;: Bir servis arızalandığında, diğerleri etkilenmez.&lt;/li&gt;&lt;/ul&gt;&lt;h3 data-end=&quot;894&quot; data-start=&quot;873&quot;&gt;3. &lt;strong data-end=&quot;893&quot; data-start=&quot;880&quot;&gt;Zorluklar&lt;/strong&gt;:&lt;/h3&gt;&lt;ul data-end=&quot;1211&quot; data-start=&quot;898&quot;&gt;&lt;li data-end=&quot;989&quot; data-start=&quot;898&quot;&gt;&lt;strong data-end=&quot;927&quot; data-start=&quot;900&quot;&gt;Dağıtık Sistem Yönetimi&lt;/strong&gt;: Servislerin birbirleriyle iletişimi karmaşık hale gelebilir.&lt;/li&gt;&lt;li data-end=&quot;1113&quot; data-start=&quot;993&quot;&gt;&lt;strong data-end=&quot;1012&quot; data-start=&quot;995&quot;&gt;Veri Yönetimi&lt;/strong&gt;: Mikroservislerde her servis kendi veritabanına sahip olmalı, bu da veri yönetimini zorlaştırabilir.&lt;/li&gt;&lt;li data-end=&quot;1211&quot; data-start=&quot;1117&quot;&gt;&lt;strong data-end=&quot;1137&quot; data-start=&quot;1119&quot;&gt;Test ve İzleme&lt;/strong&gt;: Dağıtık yapılar için test etmek ve izleme yapmak daha karmaşık olabilir.&lt;/li&gt;&lt;/ul&gt;&lt;h3 data-end=&quot;1241&quot; data-start=&quot;1213&quot;&gt;4. &lt;strong data-end=&quot;1240&quot; data-start=&quot;1220&quot;&gt;Temel Bileşenler&lt;/strong&gt;:&lt;/h3&gt;&lt;ul data-end=&quot;1733&quot; data-start=&quot;1245&quot;&gt;&lt;li data-end=&quot;1330&quot; data-start=&quot;1245&quot;&gt;&lt;strong data-end=&quot;1262&quot; data-start=&quot;1247&quot;&gt;API Gateway&lt;/strong&gt;: Mikroservislere gelen tüm isteklerin tek bir noktadan yönetilmesi.&lt;/li&gt;&lt;li data-end=&quot;1439&quot; data-start=&quot;1334&quot;&gt;&lt;strong data-end=&quot;1357&quot; data-start=&quot;1336&quot;&gt;Service Discovery&lt;/strong&gt;: Mikroservislerin birbirini bulabilmesi için sistem (Consul, Eureka, Kubernetes).&lt;/li&gt;&lt;li data-end=&quot;1526&quot; data-start=&quot;1443&quot;&gt;&lt;strong data-end=&quot;1472&quot; data-start=&quot;1445&quot;&gt;Mesajlaşma ve Kuyruklar&lt;/strong&gt;: Asenkron iletişim için RabbitMQ, Kafka gibi araçlar.&lt;/li&gt;&lt;li data-end=&quot;1632&quot; data-start=&quot;1530&quot;&gt;&lt;strong data-end=&quot;1566&quot; data-start=&quot;1532&quot;&gt;Devre Kesici (Circuit Breaker)&lt;/strong&gt;: Hatalı servislerin yayılmasını engeller (Hystrix, Resilience4j).&lt;/li&gt;&lt;li data-end=&quot;1733&quot; data-start=&quot;1636&quot;&gt;&lt;strong data-end=&quot;1655&quot; data-start=&quot;1638&quot;&gt;Veri Yönetimi&lt;/strong&gt;: Mikroservislerin kendi veritabanları olmalı ve veri tutarlılığı yönetilmeli.&lt;/li&gt;&lt;/ul&gt;&lt;h3 data-end=&quot;1775&quot; data-start=&quot;1735&quot;&gt;5. &lt;strong data-end=&quot;1774&quot; data-start=&quot;1742&quot;&gt;Güvenlik ve Kimlik Doğrulama&lt;/strong&gt;:&lt;/h3&gt;&lt;ul data-end=&quot;1918&quot; data-start=&quot;1779&quot;&gt;&lt;li data-end=&quot;1860&quot; data-start=&quot;1779&quot;&gt;&lt;strong data-end=&quot;1796&quot; data-start=&quot;1781&quot;&gt;OAuth2, JWT&lt;/strong&gt; gibi standartlar ile kimlik doğrulama ve yetkilendirme yapılır.&lt;/li&gt;&lt;li data-end=&quot;1918&quot; data-start=&quot;1864&quot;&gt;&lt;strong data-end=&quot;1881&quot; data-start=&quot;1866&quot;&gt;API Gateway&lt;/strong&gt;, servisler arasında güvenlik sağlar.&lt;/li&gt;&lt;/ul&gt;&lt;h3 data-end=&quot;1949&quot; data-start=&quot;1920&quot;&gt;6. &lt;strong data-end=&quot;1948&quot; data-start=&quot;1927&quot;&gt;Loglama ve İzleme&lt;/strong&gt;:&lt;/h3&gt;&lt;ul data-end=&quot;2146&quot; data-start=&quot;1953&quot;&gt;&lt;li data-end=&quot;2060&quot; data-start=&quot;1953&quot;&gt;Merkezi loglama ve izleme araçları (ELK Stack, Graylog, Prometheus) ile mikroservislerin sağlığı izlenir.&lt;/li&gt;&lt;li data-end=&quot;2146&quot; data-start=&quot;2064&quot;&gt;&lt;strong data-end=&quot;2077&quot; data-start=&quot;2066&quot;&gt;Tracing&lt;/strong&gt; (Jaeger, Zipkin) ile mikroservisler arasındaki çağrılar izlenebilir.&lt;/li&gt;&lt;/ul&gt;&lt;h3 data-end=&quot;2165&quot; data-start=&quot;2148&quot;&gt;7. &lt;strong data-end=&quot;2164&quot; data-start=&quot;2155&quot;&gt;CI/CD&lt;/strong&gt;:&lt;/h3&gt;&lt;ul data-end=&quot;2284&quot; data-start=&quot;2169&quot;&gt;&lt;li data-end=&quot;2284&quot; data-start=&quot;2169&quot;&gt;&lt;strong data-end=&quot;2221&quot; data-start=&quot;2171&quot;&gt;Sürekli Entegrasyon ve Sürekli Dağıtım (CI/CD)&lt;/strong&gt; ile mikroservisler hızlı bir şekilde test edilir ve dağıtılır.&lt;/li&gt;&lt;/ul&gt;&lt;h3 data-end=&quot;2331&quot; data-start=&quot;2286&quot;&gt;8. &lt;strong data-end=&quot;2330&quot; data-start=&quot;2293&quot;&gt;Konteynerleştirme ve Orkestrasyon&lt;/strong&gt;:&lt;/h3&gt;&lt;ul data-end=&quot;2493&quot; data-start=&quot;2335&quot;&gt;&lt;li data-end=&quot;2397&quot; data-start=&quot;2335&quot;&gt;&lt;strong data-end=&quot;2347&quot; data-start=&quot;2337&quot;&gt;Docker&lt;/strong&gt; ile mikroservisler konteyner içinde çalıştırılır.&lt;/li&gt;&lt;li data-end=&quot;2493&quot; data-start=&quot;2401&quot;&gt;&lt;strong data-end=&quot;2417&quot; data-start=&quot;2403&quot;&gt;Kubernetes&lt;/strong&gt; veya &lt;strong data-end=&quot;2439&quot; data-start=&quot;2423&quot;&gt;Docker Swarm&lt;/strong&gt; ile konteynerlerin yönetimi ve orkestrasyonu yapılır.&lt;/li&gt;&lt;/ul&gt;&lt;h3 data-end=&quot;2515&quot; data-start=&quot;2495&quot;&gt;9. &lt;strong data-end=&quot;2514&quot; data-start=&quot;2502&quot;&gt;İletişim&lt;/strong&gt;:&lt;/h3&gt;&lt;ul data-end=&quot;2635&quot; data-start=&quot;2519&quot;&gt;&lt;li data-end=&quot;2635&quot; data-start=&quot;2519&quot;&gt;Mikroservisler arasındaki iletişim &lt;strong data-end=&quot;2584&quot; data-start=&quot;2556&quot;&gt;synchronous (REST, gRPC)&lt;/strong&gt; ya da &lt;strong data-end=&quot;2625&quot; data-start=&quot;2591&quot;&gt;asynchronous (Kafka, RabbitMQ)&lt;/strong&gt; olabilir.&lt;/li&gt;&lt;/ul&gt;&lt;p data-end=&quot;2835&quot; data-is-last-node=&quot;&quot; data-is-only-node=&quot;&quot; data-start=&quot;2637&quot;&gt;Mikroservisler, büyük, karmaşık uygulamaları yönetilebilir ve ölçeklenebilir hale getiren güçlü bir yaklaşımdır, ancak başarılı bir şekilde uygulanması dikkatli planlama ve güçlü araçlar gerektirir.&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://mehmetyoldas.blogspot.com/feeds/690730318950997783/comments/default' title='Kayıt Yorumları'/><link rel='replies' type='text/html' href='http://mehmetyoldas.blogspot.com/2025/03/mikroservis-mimarisi-nedir.html#comment-form' title='0 Yorum'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5628326400009361051/posts/default/690730318950997783'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5628326400009361051/posts/default/690730318950997783'/><link rel='alternate' type='text/html' href='http://mehmetyoldas.blogspot.com/2025/03/mikroservis-mimarisi-nedir.html' title='Mikroservis Mimarisi nedir?'/><author><name>Mehmet Yoldaş</name><uri>http://www.blogger.com/profile/17372934623166164299</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVw6x10V3awMwQJFzrhYEEvr-YMR-YcaKARcY29nS8Ny67irGfpUKqZ4uvXuwn6LQhPqNtJq5NQ4rkOE0x29vlgd4UNHA9D6B3uo8_D6VU7-5TZyDRRW-W6MAgLjn7DA/s220/profil+Ba%C5%9Fak+Foto%C4%9Fraf%C3%A7%C4%B1l%C4%B1k.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5628326400009361051.post-151911979765234310</id><published>2025-03-02T12:52:00.001+03:00</published><updated>2025-03-02T12:52:10.195+03:00</updated><title type='text'>Ocelot ile Service Discovery Kullanımı</title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;ol data-end=&quot;1653&quot; data-start=&quot;386&quot;&gt;&lt;li data-end=&quot;768&quot; data-start=&quot;386&quot;&gt;&lt;p data-end=&quot;422&quot; data-start=&quot;389&quot;&gt;&lt;strong data-end=&quot;421&quot; data-start=&quot;389&quot;&gt;Consul ile Service Discovery&lt;/strong&gt;:&lt;/p&gt;&lt;ul data-end=&quot;768&quot; data-start=&quot;426&quot;&gt;&lt;li data-end=&quot;635&quot; data-start=&quot;426&quot;&gt;&lt;p data-end=&quot;635&quot; data-start=&quot;428&quot;&gt;Ocelot, Consul ile entegre edilerek dinamik servis keşfi yapabilir. Consul, mikroservislerin birbirlerini keşfetmesini sağlar ve Ocelot API Gateway, servisler arasındaki yönlendirmeyi dinamik olarak yönetir.&lt;/p&gt;&lt;/li&gt;&lt;li data-end=&quot;768&quot; data-start=&quot;643&quot;&gt;&lt;p data-end=&quot;768&quot; data-start=&quot;645&quot;&gt;&lt;strong data-end=&quot;663&quot; data-start=&quot;645&quot;&gt;Nasıl Çalışır?&lt;/strong&gt;: Ocelot, Consul&#39;dan servislerin bilgilerini alır ve gelen API isteklerini bu bilgilere göre yönlendirir.&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li data-end=&quot;1206&quot; data-start=&quot;770&quot;&gt;&lt;p data-end=&quot;806&quot; data-start=&quot;773&quot;&gt;&lt;strong data-end=&quot;805&quot; data-start=&quot;773&quot;&gt;Eureka ile Service Discovery&lt;/strong&gt;:&lt;/p&gt;&lt;ul data-end=&quot;1206&quot; data-start=&quot;810&quot;&gt;&lt;li data-end=&quot;979&quot; data-start=&quot;810&quot;&gt;&lt;p data-end=&quot;979&quot; data-start=&quot;812&quot;&gt;Ocelot, &lt;strong data-end=&quot;830&quot; data-start=&quot;820&quot;&gt;Eureka&lt;/strong&gt; ile de entegre olabilir. &lt;strong data-end=&quot;866&quot; data-start=&quot;856&quot;&gt;Eureka&lt;/strong&gt; bir servis keşif aracıdır ve Ocelot, Eureka ile entegre olarak servisler arasında dinamik yönlendirme yapabilir.&lt;/p&gt;&lt;/li&gt;&lt;li data-end=&quot;1206&quot; data-start=&quot;987&quot;&gt;&lt;p data-end=&quot;1206&quot; data-start=&quot;989&quot;&gt;&lt;strong data-end=&quot;1007&quot; data-start=&quot;989&quot;&gt;Nasıl Çalışır?&lt;/strong&gt;: Ocelot, Eureka&#39;dan servislerin adreslerini alır ve bunlara yönlendirme yapar. Eureka, servislerin IP adreslerini ve portlarını yönetir, Ocelot ise gelen istekleri doğru mikroservislere yönlendirir.&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li data-end=&quot;1653&quot; data-start=&quot;1208&quot;&gt;&lt;p data-end=&quot;1248&quot; data-start=&quot;1211&quot;&gt;&lt;strong data-end=&quot;1247&quot; data-start=&quot;1211&quot;&gt;Kubernetes ile Service Discovery&lt;/strong&gt;:&lt;/p&gt;&lt;ul data-end=&quot;1653&quot; data-start=&quot;1252&quot;&gt;&lt;li data-end=&quot;1479&quot; data-start=&quot;1252&quot;&gt;&lt;p data-end=&quot;1479&quot; data-start=&quot;1254&quot;&gt;Kubernetes kullanıyorsanız, Ocelot API Gateway ve Kubernetes servisleri arasında da Service Discovery entegrasyonu sağlanabilir. Kubernetes, servislere IP adresleri ve DNS sağlayarak, Ocelot da bu adreslere yönlendirme yapar.&lt;/p&gt;&lt;/li&gt;&lt;li data-end=&quot;1653&quot; data-start=&quot;1487&quot;&gt;&lt;p data-end=&quot;1653&quot; data-start=&quot;1489&quot;&gt;&lt;strong data-end=&quot;1507&quot; data-start=&quot;1489&quot;&gt;Nasıl Çalışır?&lt;/strong&gt;: Kubernetes, servislerin DNS adlarını ve IP adreslerini sağlar, Ocelot ise gelen istekleri bu servislerin yönlendirilmesi gereken IP&#39;lere iletir.&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ol&gt;&lt;h3 data-end=&quot;1681&quot; data-start=&quot;1655&quot;&gt;Ocelot Konfigürasyonu:&lt;/h3&gt;&lt;p data-end=&quot;1925&quot; data-start=&quot;1682&quot;&gt;Ocelot, &lt;strong data-end=&quot;1711&quot; data-start=&quot;1690&quot;&gt;Service Discovery&lt;/strong&gt; özelliklerini desteklerken, bunun için uygun &lt;strong data-end=&quot;1777&quot; data-start=&quot;1757&quot;&gt;appsettings.json&lt;/strong&gt; veya &lt;strong data-end=&quot;1798&quot; data-start=&quot;1783&quot;&gt;ocelot.json&lt;/strong&gt; dosyasına konfigurasyon eklemek gereklidir. Aşağıda &lt;strong data-end=&quot;1861&quot; data-start=&quot;1851&quot;&gt;Eureka&lt;/strong&gt; ile nasıl yapılandırılacağını gösteren bir örnek bulunmaktadır:&lt;/p&gt;&lt;pre class=&quot;!overflow-visible&quot; data-end=&quot;2382&quot; data-start=&quot;1927&quot;&gt;&lt;div class=&quot;contain-inline-size rounded-md border-[0.5px] border-token-border-medium relative bg-token-sidebar-surface-primary dark:bg-gray-950&quot;&gt;&lt;div class=&quot;flex items-center text-token-text-secondary px-4 py-2 text-xs font-sans justify-between rounded-t-[5px] h-9 bg-token-sidebar-surface-primary dark:bg-token-main-surface-secondary select-none&quot;&gt;json&lt;/div&gt;&lt;div class=&quot;sticky top-9 md:top-[5.75rem]&quot;&gt;&lt;div class=&quot;absolute bottom-0 right-2 flex h-9 items-center&quot;&gt;&lt;div class=&quot;flex items-center rounded bg-token-sidebar-surface-primary px-2 font-sans text-xs text-token-text-secondary dark:bg-token-main-surface-secondary&quot;&gt;&lt;span class=&quot;&quot; data-state=&quot;closed&quot;&gt;&lt;button aria-label=&quot;Kopyala&quot; class=&quot;flex gap-1 items-center select-none px-4 py-1&quot;&gt;&lt;svg class=&quot;icon-xs&quot; fill=&quot;none&quot; height=&quot;24&quot; viewbox=&quot;0 0 24 24&quot; width=&quot;24&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot;&gt;&lt;path clip-rule=&quot;evenodd&quot; d=&quot;M7 5C7 3.34315 8.34315 2 10 2H19C20.6569 2 22 3.34315 22 5V14C22 15.6569 20.6569 17 19 17H17V19C17 20.6569 15.6569 22 14 22H5C3.34315 22 2 20.6569 2 19V10C2 8.34315 3.34315 7 5 7H7V5ZM9 7H14C15.6569 7 17 8.34315 17 10V15H19C19.5523 15 20 14.5523 20 14V5C20 4.44772 19.5523 4 19 4H10C9.44772 4 9 4.44772 9 5V7ZM5 9C4.44772 9 4 9.44772 4 10V19C4 19.5523 4.44772 20 5 20H14C14.5523 20 15 19.5523 15 19V10C15 9.44772 14.5523 9 14 9H5Z&quot; fill-rule=&quot;evenodd&quot; fill=&quot;currentColor&quot;&gt;&lt;/path&gt;&lt;/svg&gt;Kopyala&lt;/button&gt;&lt;/span&gt;&lt;span class=&quot;&quot; data-state=&quot;closed&quot;&gt;&lt;button class=&quot;flex select-none items-center gap-1&quot;&gt;&lt;svg class=&quot;icon-xs&quot; fill=&quot;none&quot; height=&quot;24&quot; viewbox=&quot;0 0 24 24&quot; width=&quot;24&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot;&gt;&lt;path d=&quot;M2.5 5.5C4.3 5.2 5.2 4 5.5 2.5C5.8 4 6.7 5.2 8.5 5.5C6.7 5.8 5.8 7 5.5 8.5C5.2 7 4.3 5.8 2.5 5.5Z&quot; fill=&quot;currentColor&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot; stroke=&quot;currentColor&quot;&gt;&lt;/path&gt;&lt;path d=&quot;M5.66282 16.5231L5.18413 19.3952C5.12203 19.7678 5.09098 19.9541 5.14876 20.0888C5.19933 20.2067 5.29328 20.3007 5.41118 20.3512C5.54589 20.409 5.73218 20.378 6.10476 20.3159L8.97693 19.8372C9.72813 19.712 10.1037 19.6494 10.4542 19.521C10.7652 19.407 11.0608 19.2549 11.3343 19.068C11.6425 18.8575 11.9118 18.5882 12.4503 18.0497L20 10.5C21.3807 9.11929 21.3807 6.88071 20 5.5C18.6193 4.11929 16.3807 4.11929 15 5.5L7.45026 13.0497C6.91175 13.5882 6.6425 13.8575 6.43197 14.1657C6.24513 14.4392 6.09299 14.7348 5.97903 15.0458C5.85062 15.3963 5.78802 15.7719 5.66282 16.5231Z&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot; stroke-width=&quot;2&quot; stroke=&quot;currentColor&quot;&gt;&lt;/path&gt;&lt;path d=&quot;M14.5 7L18.5 11&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot; stroke-width=&quot;2&quot; stroke=&quot;currentColor&quot;&gt;&lt;/path&gt;&lt;/svg&gt;Düzenle&lt;/button&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;overflow-y-auto p-4&quot; dir=&quot;ltr&quot;&gt;&lt;code class=&quot;!whitespace-pre language-json&quot;&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;hljs-attr&quot;&gt;&quot;ReRoutes&quot;&lt;/span&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;hljs-punctuation&quot;&gt;[&lt;/span&gt;
    &lt;span class=&quot;hljs-punctuation&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;hljs-attr&quot;&gt;&quot;DownstreamPathTemplate&quot;&lt;/span&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;hljs-string&quot;&gt;&quot;/api/{everything}&quot;&lt;/span&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;,&lt;/span&gt;
      &lt;span class=&quot;hljs-attr&quot;&gt;&quot;DownstreamScheme&quot;&lt;/span&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;hljs-string&quot;&gt;&quot;http&quot;&lt;/span&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;,&lt;/span&gt;
      &lt;span class=&quot;hljs-attr&quot;&gt;&quot;UpstreamPathTemplate&quot;&lt;/span&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;hljs-string&quot;&gt;&quot;/api/{everything}&quot;&lt;/span&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;,&lt;/span&gt;
      &lt;span class=&quot;hljs-attr&quot;&gt;&quot;UpstreamHttpMethod&quot;&lt;/span&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;hljs-punctuation&quot;&gt;[&lt;/span&gt; &lt;span class=&quot;hljs-string&quot;&gt;&quot;Get&quot;&lt;/span&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;hljs-string&quot;&gt;&quot;Post&quot;&lt;/span&gt; &lt;span class=&quot;hljs-punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;,&lt;/span&gt;
      &lt;span class=&quot;hljs-attr&quot;&gt;&quot;AuthenticationOptions&quot;&lt;/span&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;hljs-punctuation&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;hljs-attr&quot;&gt;&quot;Provider&quot;&lt;/span&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;hljs-string&quot;&gt;&quot;JwtBearer&quot;&lt;/span&gt;
      &lt;span class=&quot;hljs-punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;,&lt;/span&gt;
      &lt;span class=&quot;hljs-attr&quot;&gt;&quot;ServiceName&quot;&lt;/span&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;hljs-string&quot;&gt;&quot;MyService&quot;&lt;/span&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;hljs-comment&quot;&gt;// Servis adı&lt;/span&gt;
      &lt;span class=&quot;hljs-attr&quot;&gt;&quot;Eureka&quot;&lt;/span&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;hljs-punctuation&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;hljs-attr&quot;&gt;&quot;Enabled&quot;&lt;/span&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;hljs-literal&quot;&gt;&lt;span class=&quot;hljs-keyword&quot;&gt;true&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;,&lt;/span&gt;
        &lt;span class=&quot;hljs-attr&quot;&gt;&quot;Url&quot;&lt;/span&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;hljs-string&quot;&gt;&quot;http://eureka-server:8761/eureka&quot;&lt;/span&gt;
      &lt;span class=&quot;hljs-punctuation&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;hljs-punctuation&quot;&gt;}&lt;/span&gt;
  &lt;span class=&quot;hljs-punctuation&quot;&gt;]&lt;/span&gt;
&lt;span class=&quot;hljs-punctuation&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;h3 data-end=&quot;2394&quot; data-start=&quot;2384&quot;&gt;Sonuç:&lt;/h3&gt;&lt;ul data-end=&quot;2874&quot; data-is-last-node=&quot;&quot; data-is-only-node=&quot;&quot; data-start=&quot;2395&quot;&gt;&lt;li data-end=&quot;2555&quot; data-start=&quot;2395&quot;&gt;&lt;strong data-end=&quot;2407&quot; data-start=&quot;2397&quot;&gt;Ocelot&lt;/strong&gt; bir API Gateway olarak &lt;strong data-end=&quot;2452&quot; data-start=&quot;2431&quot;&gt;Service Discovery&lt;/strong&gt; desteği sağlar ancak bunun için harici araçlara (Consul, Eureka, Kubernetes) entegre edilmesi gerekir.&lt;/li&gt;&lt;li data-end=&quot;2741&quot; data-start=&quot;2556&quot;&gt;Eğer &lt;strong data-end=&quot;2573&quot; data-start=&quot;2563&quot;&gt;Eureka&lt;/strong&gt; veya &lt;strong data-end=&quot;2589&quot; data-start=&quot;2579&quot;&gt;Consul&lt;/strong&gt; gibi bir Service Discovery aracını kullanıyorsan, Ocelot bu araçlarla entegre olarak dinamik olarak servisleri keşfeder ve gelen istekleri yönlendirir.&lt;/li&gt;&lt;li data-end=&quot;2874&quot; data-is-last-node=&quot;&quot; data-start=&quot;2742&quot;&gt;Ocelot&#39;un &lt;strong data-end=&quot;2775&quot; data-start=&quot;2754&quot;&gt;Service Discovery&lt;/strong&gt; özelliği, mikroservislerin daha dinamik bir şekilde birbirleriyle iletişim kurmasına olanak tanır.&lt;/li&gt;&lt;/ul&gt;</content><link rel='replies' type='application/atom+xml' href='http://mehmetyoldas.blogspot.com/feeds/151911979765234310/comments/default' title='Kayıt Yorumları'/><link rel='replies' type='text/html' href='http://mehmetyoldas.blogspot.com/2025/03/ocelot-ile-service-discovery-kullanm.html#comment-form' title='0 Yorum'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5628326400009361051/posts/default/151911979765234310'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5628326400009361051/posts/default/151911979765234310'/><link rel='alternate' type='text/html' href='http://mehmetyoldas.blogspot.com/2025/03/ocelot-ile-service-discovery-kullanm.html' title='Ocelot ile Service Discovery Kullanımı'/><author><name>Mehmet Yoldaş</name><uri>http://www.blogger.com/profile/17372934623166164299</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVw6x10V3awMwQJFzrhYEEvr-YMR-YcaKARcY29nS8Ny67irGfpUKqZ4uvXuwn6LQhPqNtJq5NQ4rkOE0x29vlgd4UNHA9D6B3uo8_D6VU7-5TZyDRRW-W6MAgLjn7DA/s220/profil+Ba%C5%9Fak+Foto%C4%9Fraf%C3%A7%C4%B1l%C4%B1k.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5628326400009361051.post-1883145515534865802</id><published>2025-03-02T12:49:00.002+03:00</published><updated>2025-03-02T12:49:52.817+03:00</updated><title type='text'>Graylog&#39;un Mikroservislerdeki Kullanım Şekli</title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h3 data-end=&quot;323&quot; data-start=&quot;285&quot;&gt;Graylog&#39;un Mikroservislerdeki Rolü&lt;/h3&gt;&lt;ol data-end=&quot;1827&quot; data-start=&quot;325&quot;&gt;&lt;li data-end=&quot;667&quot; data-start=&quot;325&quot;&gt;&lt;p data-end=&quot;370&quot; data-start=&quot;328&quot;&gt;&lt;strong data-end=&quot;369&quot; data-start=&quot;328&quot;&gt;Merkezi Loglama (Centralized Logging)&lt;/strong&gt;:&lt;/p&gt;&lt;ul data-end=&quot;667&quot; data-start=&quot;374&quot;&gt;&lt;li data-end=&quot;547&quot; data-start=&quot;374&quot;&gt;Mikroservislerin her biri kendi loglarını oluşturur ve bu loglar merkezi bir noktada toplanabilir. Graylog, bu logları tek bir yerde toplar ve analiz etmeyi kolaylaştırır.&lt;/li&gt;&lt;li data-end=&quot;667&quot; data-start=&quot;551&quot;&gt;Her mikroservisten gelen log verilerini toplayarak merkezi bir depoda saklayabilir ve kolayca sorgulayabilirsiniz.&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li data-end=&quot;884&quot; data-start=&quot;669&quot;&gt;&lt;p data-end=&quot;698&quot; data-start=&quot;672&quot;&gt;&lt;strong data-end=&quot;697&quot; data-start=&quot;672&quot;&gt;Gerçek Zamanlı İzleme&lt;/strong&gt;:&lt;/p&gt;&lt;ul data-end=&quot;884&quot; data-start=&quot;702&quot;&gt;&lt;li data-end=&quot;880&quot; data-start=&quot;702&quot;&gt;&lt;strong data-end=&quot;715&quot; data-start=&quot;704&quot;&gt;Graylog&lt;/strong&gt;, logları gerçek zamanlı olarak izleme imkanı sunar. Bu, servislerin durumunu, hataları, uyarıları ve performans göstergelerini hızlıca tespit etmenize olanak tanır.&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li data-end=&quot;1280&quot; data-start=&quot;885&quot;&gt;&lt;p data-end=&quot;922&quot; data-start=&quot;888&quot;&gt;&lt;strong data-end=&quot;921&quot; data-start=&quot;888&quot;&gt;Log Analizi ve Görselleştirme&lt;/strong&gt;:&lt;/p&gt;&lt;ul data-end=&quot;1280&quot; data-start=&quot;926&quot;&gt;&lt;li data-end=&quot;1122&quot; data-start=&quot;926&quot;&gt;Log verileri üzerinde sorgular yaparak belirli hataları veya olayları tespit edebilirsiniz. Ayrıca, Graylog&#39;un sağladığı görselleştirme araçları ile log verilerini anlamak daha kolay hale gelir.&lt;/li&gt;&lt;li data-end=&quot;1280&quot; data-start=&quot;1126&quot;&gt;Örneğin, hatalı istekler veya performans problemleri için grafikler oluşturabilir ve sistemdeki potansiyel sorunları görsel olarak tespit edebilirsiniz.&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li data-end=&quot;1495&quot; data-start=&quot;1282&quot;&gt;&lt;p data-end=&quot;1309&quot; data-start=&quot;1285&quot;&gt;&lt;strong data-end=&quot;1308&quot; data-start=&quot;1285&quot;&gt;Alerting (Uyarılar)&lt;/strong&gt;:&lt;/p&gt;&lt;ul data-end=&quot;1495&quot; data-start=&quot;1313&quot;&gt;&lt;li data-end=&quot;1495&quot; data-start=&quot;1313&quot;&gt;Graylog, belirli log seviyelerinde (örneğin, hata veya kritik) uyarılar oluşturmanıza imkan tanır. Bu sayede, belirli bir hata ya da sorun oluştuğunda hemen haberdar olabilirsiniz.&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li data-end=&quot;1827&quot; data-start=&quot;1497&quot;&gt;&lt;p data-end=&quot;1543&quot; data-start=&quot;1500&quot;&gt;&lt;strong data-end=&quot;1542&quot; data-start=&quot;1500&quot;&gt;Kolay Entegrasyon ve Ölçeklenebilirlik&lt;/strong&gt;:&lt;/p&gt;&lt;ul data-end=&quot;1827&quot; data-start=&quot;1547&quot;&gt;&lt;li data-end=&quot;1756&quot; data-start=&quot;1547&quot;&gt;Mikroservislerle entegre edilmesi oldukça kolaydır. Çoğu zaman, Graylog ile birlikte &lt;strong data-end=&quot;1646&quot; data-start=&quot;1634&quot;&gt;Filebeat&lt;/strong&gt; veya &lt;strong data-end=&quot;1663&quot; data-start=&quot;1652&quot;&gt;Fluentd&lt;/strong&gt; gibi araçlar kullanarak logları mikroservislerden toplayabilir ve Graylog&#39;a iletebilirsiniz.&lt;/li&gt;&lt;li data-end=&quot;1827&quot; data-start=&quot;1760&quot;&gt;Ayrıca, &lt;strong data-end=&quot;1784&quot; data-start=&quot;1770&quot;&gt;Kubernetes&lt;/strong&gt; gibi ortamlarda da kolayca ölçeklenebilir.&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ol&gt;&lt;h3 data-end=&quot;1865&quot; data-start=&quot;1829&quot;&gt;Graylog&#39;un Sağladığı Avantajlar:&lt;/h3&gt;&lt;ul data-end=&quot;2336&quot; data-start=&quot;1867&quot;&gt;&lt;li data-end=&quot;2033&quot; data-start=&quot;1867&quot;&gt;&lt;strong data-end=&quot;1884&quot; data-start=&quot;1869&quot;&gt;Esnek Arama&lt;/strong&gt;: Graylog, log verilerini hızlı bir şekilde aramanıza olanak tanır, böylece belirli hatalar veya olaylar hakkında hızlıca bilgi sahibi olabilirsiniz.&lt;/li&gt;&lt;li data-end=&quot;2175&quot; data-start=&quot;2034&quot;&gt;&lt;strong data-end=&quot;2060&quot; data-start=&quot;2036&quot;&gt;Kapsamlı API Desteği&lt;/strong&gt;: Uygulama geliştiricileri için zengin API desteği sunarak log verilerine kolayca erişmenizi ve yönetmenizi sağlar.&lt;/li&gt;&lt;li data-end=&quot;2336&quot; data-start=&quot;2176&quot;&gt;&lt;strong data-end=&quot;2199&quot; data-start=&quot;2178&quot;&gt;Yüksek Performans&lt;/strong&gt;: Graylog, büyük miktarda log verisini işleyebilecek kapasiteye sahiptir, bu da mikroservis mimarisi gibi büyük sistemler için önemlidir.&lt;/li&gt;&lt;/ul&gt;&lt;h3 data-end=&quot;2348&quot; data-start=&quot;2338&quot;&gt;Sonuç:&lt;/h3&gt;&lt;p data-end=&quot;2612&quot; data-is-last-node=&quot;&quot; data-is-only-node=&quot;&quot; data-start=&quot;2349&quot;&gt;Evet, &lt;strong data-end=&quot;2366&quot; data-start=&quot;2355&quot;&gt;Graylog&lt;/strong&gt;, loglama ve izleme için oldukça etkili ve verimli bir araçtır. Mikroservis mimarisinde log yönetimi ve izleme için olmazsa olmazlardan biridir. Eğer loglama ve monitoring konusunda güçlü bir çözüm arıyorsanız, Graylog harika bir seçim olacaktır.&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://mehmetyoldas.blogspot.com/feeds/1883145515534865802/comments/default' title='Kayıt Yorumları'/><link rel='replies' type='text/html' href='http://mehmetyoldas.blogspot.com/2025/03/graylogun-mikroservislerdeki-kullanm.html#comment-form' title='0 Yorum'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5628326400009361051/posts/default/1883145515534865802'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5628326400009361051/posts/default/1883145515534865802'/><link rel='alternate' type='text/html' href='http://mehmetyoldas.blogspot.com/2025/03/graylogun-mikroservislerdeki-kullanm.html' title='Graylog&#39;un Mikroservislerdeki Kullanım Şekli'/><author><name>Mehmet Yoldaş</name><uri>http://www.blogger.com/profile/17372934623166164299</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVw6x10V3awMwQJFzrhYEEvr-YMR-YcaKARcY29nS8Ny67irGfpUKqZ4uvXuwn6LQhPqNtJq5NQ4rkOE0x29vlgd4UNHA9D6B3uo8_D6VU7-5TZyDRRW-W6MAgLjn7DA/s220/profil+Ba%C5%9Fak+Foto%C4%9Fraf%C3%A7%C4%B1l%C4%B1k.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5628326400009361051.post-6302669567392940351</id><published>2025-03-02T12:44:00.004+03:00</published><updated>2025-03-02T12:46:51.897+03:00</updated><title type='text'>Microservice mimarisinde olmazsa olmazlar!</title><content type='html'>&lt;p data-end=&quot;233&quot; data-start=&quot;0&quot;&gt;Mikroservis mimarisinde bazı bileşenler ve yaklaşımlar gerçekten olmazsa olmazdır. Bunlar, mikroservislerin verimli ve sürdürülebilir bir şekilde çalışabilmesi için kritik öneme sahiptir. İşte mikroservislerdeki &lt;strong data-end=&quot;232&quot; data-start=&quot;212&quot;&gt;olmazsa olmazlar&lt;/strong&gt;:&lt;/p&gt;&lt;h3 data-end=&quot;257&quot; data-start=&quot;235&quot;&gt;1. &lt;strong data-end=&quot;257&quot; data-start=&quot;242&quot;&gt;API Gateway&lt;/strong&gt;&lt;/h3&gt;&lt;ul data-end=&quot;537&quot; data-start=&quot;261&quot;&gt;&lt;li data-end=&quot;486&quot; data-start=&quot;261&quot;&gt;&lt;strong data-end=&quot;273&quot; data-start=&quot;263&quot;&gt;Neden?&lt;/strong&gt;: Mikroservislerin dış dünyaya açılan tek kapısıdır. API Gateway, gelen istekleri doğru mikroservislere yönlendirmek, kimlik doğrulama, hız sınırlama (rate limiting) ve yük dengeleme gibi işlevleri yerine getirir.&lt;/li&gt;&lt;li data-end=&quot;537&quot; data-start=&quot;490&quot;&gt;&lt;strong data-end=&quot;504&quot; data-start=&quot;492&quot;&gt;Örnekler&lt;/strong&gt;: &lt;strong data-end=&quot;516&quot; data-start=&quot;506&quot;&gt;Ocelot&lt;/strong&gt;, &lt;strong data-end=&quot;526&quot; data-start=&quot;518&quot;&gt;Kong&lt;/strong&gt;, &lt;strong data-end=&quot;536&quot; data-start=&quot;528&quot;&gt;Zuul&lt;/strong&gt;.&lt;/li&gt;&lt;/ul&gt;&lt;h3 data-end=&quot;582&quot; data-start=&quot;539&quot;&gt;2. &lt;strong data-end=&quot;582&quot; data-start=&quot;546&quot;&gt;Service Discovery (Hizmet Keşfi)&lt;/strong&gt;&lt;/h3&gt;&lt;ul data-end=&quot;839&quot; data-start=&quot;586&quot;&gt;&lt;li data-end=&quot;781&quot; data-start=&quot;586&quot;&gt;&lt;strong data-end=&quot;598&quot; data-start=&quot;588&quot;&gt;Neden?&lt;/strong&gt;: Mikroservislerin sayısı arttıkça, her birinin IP adresleri dinamik olarak değişebilir. Bu nedenle mikroservislerin birbirlerini bulabilmesi için bir hizmet keşfi sistemi gereklidir.&lt;/li&gt;&lt;li data-end=&quot;839&quot; data-start=&quot;785&quot;&gt;&lt;strong data-end=&quot;799&quot; data-start=&quot;787&quot;&gt;Örnekler&lt;/strong&gt;: &lt;strong data-end=&quot;811&quot; data-start=&quot;801&quot;&gt;Consul&lt;/strong&gt;, &lt;strong data-end=&quot;823&quot; data-start=&quot;813&quot;&gt;Eureka&lt;/strong&gt;, &lt;strong data-end=&quot;838&quot; data-start=&quot;825&quot;&gt;Zookeeper&lt;/strong&gt;.&lt;/li&gt;&lt;/ul&gt;&lt;h3 data-end=&quot;882&quot; data-start=&quot;841&quot;&gt;3. &lt;strong data-end=&quot;882&quot; data-start=&quot;848&quot;&gt;Load Balancing (Yük Dengeleme)&lt;/strong&gt;&lt;/h3&gt;&lt;ul data-end=&quot;1098&quot; data-start=&quot;886&quot;&gt;&lt;li data-end=&quot;1031&quot; data-start=&quot;886&quot;&gt;&lt;strong data-end=&quot;898&quot; data-start=&quot;888&quot;&gt;Neden?&lt;/strong&gt;: Yük dengeleme, mikroservislerin yükünü dengelemek, kaynakları verimli kullanmak ve yüksek erişilebilirlik sağlamak için gereklidir.&lt;/li&gt;&lt;li data-end=&quot;1098&quot; data-start=&quot;1035&quot;&gt;&lt;strong data-end=&quot;1049&quot; data-start=&quot;1037&quot;&gt;Örnekler&lt;/strong&gt;: &lt;strong data-end=&quot;1060&quot; data-start=&quot;1051&quot;&gt;Nginx&lt;/strong&gt;, &lt;strong data-end=&quot;1073&quot; data-start=&quot;1062&quot;&gt;HAProxy&lt;/strong&gt;, &lt;strong data-end=&quot;1097&quot; data-start=&quot;1075&quot;&gt;Kubernetes Ingress&lt;/strong&gt;.&lt;/li&gt;&lt;/ul&gt;&lt;h3 data-end=&quot;1146&quot; data-start=&quot;1100&quot;&gt;4. &lt;strong data-end=&quot;1146&quot; data-start=&quot;1107&quot;&gt;Message Broker (Mesajlaşma Sistemi)&lt;/strong&gt;&lt;/h3&gt;&lt;ul data-end=&quot;1382&quot; data-start=&quot;1150&quot;&gt;&lt;li data-end=&quot;1315&quot; data-start=&quot;1150&quot;&gt;&lt;strong data-end=&quot;1162&quot; data-start=&quot;1152&quot;&gt;Neden?&lt;/strong&gt;: Mikroservisler arasında asenkron veri iletimi ve iletişim gereklidir. Bu, servisler arası bağımlılığı azaltır ve sistemin ölçeklenebilirliğini artırır.&lt;/li&gt;&lt;li data-end=&quot;1382&quot; data-start=&quot;1319&quot;&gt;&lt;strong data-end=&quot;1333&quot; data-start=&quot;1321&quot;&gt;Örnekler&lt;/strong&gt;: &lt;strong data-end=&quot;1347&quot; data-start=&quot;1335&quot;&gt;RabbitMQ&lt;/strong&gt;, &lt;strong data-end=&quot;1358&quot; data-start=&quot;1349&quot;&gt;Kafka&lt;/strong&gt;, &lt;strong data-end=&quot;1381&quot; data-start=&quot;1360&quot;&gt;Azure Service Bus&lt;/strong&gt;.&lt;/li&gt;&lt;/ul&gt;&lt;h3 data-end=&quot;1461&quot; data-start=&quot;1384&quot;&gt;5. &lt;strong data-end=&quot;1461&quot; data-start=&quot;1391&quot;&gt;Authentication &amp;amp; Authorization (Kimlik Doğrulama ve Yetkilendirme)&lt;/strong&gt;&lt;/h3&gt;&lt;ul data-end=&quot;1708&quot; data-start=&quot;1465&quot;&gt;&lt;li data-end=&quot;1630&quot; data-start=&quot;1465&quot;&gt;&lt;strong data-end=&quot;1477&quot; data-start=&quot;1467&quot;&gt;Neden?&lt;/strong&gt;: Güvenlik her zaman birinci öncelik olmalıdır. Her mikroservisin kendi kimlik doğrulama ve yetkilendirme mekanizmalarına sahip olması, güvenliği sağlar.&lt;/li&gt;&lt;li data-end=&quot;1708&quot; data-start=&quot;1634&quot;&gt;&lt;strong data-end=&quot;1648&quot; data-start=&quot;1636&quot;&gt;Örnekler&lt;/strong&gt;: &lt;strong data-end=&quot;1660&quot; data-start=&quot;1650&quot;&gt;OAuth2&lt;/strong&gt;, &lt;strong data-end=&quot;1687&quot; data-start=&quot;1662&quot;&gt;JWT (JSON Web Tokens)&lt;/strong&gt;, &lt;strong data-end=&quot;1707&quot; data-start=&quot;1689&quot;&gt;IdentityServer&lt;/strong&gt;.&lt;/li&gt;&lt;/ul&gt;&lt;h3 data-end=&quot;1751&quot; data-start=&quot;1710&quot;&gt;6. &lt;strong data-end=&quot;1751&quot; data-start=&quot;1717&quot;&gt;Circuit Breaker (Devre Kesici)&lt;/strong&gt;&lt;/h3&gt;&lt;ul data-end=&quot;1980&quot; data-start=&quot;1755&quot;&gt;&lt;li data-end=&quot;1937&quot; data-start=&quot;1755&quot;&gt;&lt;strong data-end=&quot;1767&quot; data-start=&quot;1757&quot;&gt;Neden?&lt;/strong&gt;: Bağımlı olan mikroservislerden biri arızalandığında, diğer mikroservislerin de etkilenmemesi gerekir. Devre kesici, bu durumda servisi geçici olarak devre dışı bırakır.&lt;/li&gt;&lt;li data-end=&quot;1980&quot; data-start=&quot;1941&quot;&gt;&lt;strong data-end=&quot;1955&quot; data-start=&quot;1943&quot;&gt;Örnekler&lt;/strong&gt;: &lt;strong data-end=&quot;1968&quot; data-start=&quot;1957&quot;&gt;Hystrix&lt;/strong&gt;, &lt;strong data-end=&quot;1979&quot; data-start=&quot;1970&quot;&gt;Polly&lt;/strong&gt;.&lt;/li&gt;&lt;/ul&gt;&lt;h3 data-end=&quot;2037&quot; data-start=&quot;1982&quot;&gt;7. &lt;strong data-end=&quot;2037&quot; data-start=&quot;1989&quot;&gt;Logging (Kayıt Tutma) ve Monitoring (İzleme)&lt;/strong&gt;&lt;/h3&gt;&lt;ul data-end=&quot;2317&quot; data-start=&quot;2041&quot;&gt;&lt;li data-end=&quot;2220&quot; data-start=&quot;2041&quot;&gt;&lt;strong data-end=&quot;2053&quot; data-start=&quot;2043&quot;&gt;Neden?&lt;/strong&gt;: Mikroservislerin durumunu izlemek ve hataları tespit etmek için merkezi bir log yönetim ve izleme altyapısı gereklidir. Bu, sorunları hızlıca tespit etmenizi sağlar.&lt;/li&gt;&lt;li data-end=&quot;2317&quot; data-start=&quot;2224&quot;&gt;&lt;strong data-end=&quot;2238&quot; data-start=&quot;2226&quot;&gt;Örnekler&lt;/strong&gt;: &lt;strong data-end=&quot;2287&quot; data-start=&quot;2240&quot;&gt;ELK Stack (Elasticsearch, Logstash, Kibana)&lt;/strong&gt;, &lt;strong data-end=&quot;2303&quot; data-start=&quot;2289&quot;&gt;Prometheus&lt;/strong&gt;, &lt;strong data-end=&quot;2316&quot; data-start=&quot;2305&quot;&gt;Grafana&lt;/strong&gt;.&lt;/li&gt;&lt;/ul&gt;&lt;h3 data-end=&quot;2387&quot; data-start=&quot;2319&quot;&gt;8. &lt;strong data-end=&quot;2387&quot; data-start=&quot;2326&quot;&gt;Centralized Configuration (Merkezi Yapılandırma Yönetimi)&lt;/strong&gt;&lt;/h3&gt;&lt;ul data-end=&quot;2671&quot; data-start=&quot;2391&quot;&gt;&lt;li data-end=&quot;2604&quot; data-start=&quot;2391&quot;&gt;&lt;strong data-end=&quot;2403&quot; data-start=&quot;2393&quot;&gt;Neden?&lt;/strong&gt;: Mikroservisler çok sayıda konfigürasyon dosyasına sahip olabilir. Merkezi bir yapılandırma yönetim sistemi, bu dosyaları merkezi bir yerden yönetmeyi ve servisler arası uyumu sağlamayı kolaylaştırır.&lt;/li&gt;&lt;li data-end=&quot;2671&quot; data-start=&quot;2608&quot;&gt;&lt;strong data-end=&quot;2622&quot; data-start=&quot;2610&quot;&gt;Örnekler&lt;/strong&gt;: &lt;strong data-end=&quot;2647&quot; data-start=&quot;2624&quot;&gt;Spring Cloud Config&lt;/strong&gt;, &lt;strong data-end=&quot;2659&quot; data-start=&quot;2649&quot;&gt;Consul&lt;/strong&gt;, &lt;strong data-end=&quot;2670&quot; data-start=&quot;2661&quot;&gt;Vault&lt;/strong&gt;.&lt;/li&gt;&lt;/ul&gt;&lt;h3 data-end=&quot;2736&quot; data-start=&quot;2673&quot;&gt;9. &lt;strong data-end=&quot;2736&quot; data-start=&quot;2680&quot;&gt;CI/CD (Continuous Integration/Continuous Deployment)&lt;/strong&gt;&lt;/h3&gt;&lt;ul data-end=&quot;3031&quot; data-start=&quot;2740&quot;&gt;&lt;li data-end=&quot;2970&quot; data-start=&quot;2740&quot;&gt;&lt;strong data-end=&quot;2752&quot; data-start=&quot;2742&quot;&gt;Neden?&lt;/strong&gt;: Mikroservislerin sürekli entegrasyonu ve dağıtımı, yazılım geliştirme sürecini otomatikleştirir ve hızlı geri bildirim alınmasını sağlar. Bu, hataların erken tespit edilmesini ve hızlı bir şekilde çözülmesini sağlar.&lt;/li&gt;&lt;li data-end=&quot;3031&quot; data-start=&quot;2974&quot;&gt;&lt;strong data-end=&quot;2988&quot; data-start=&quot;2976&quot;&gt;Örnekler&lt;/strong&gt;: &lt;strong data-end=&quot;3001&quot; data-start=&quot;2990&quot;&gt;Jenkins&lt;/strong&gt;, &lt;strong data-end=&quot;3016&quot; data-start=&quot;3003&quot;&gt;GitLab CI&lt;/strong&gt;, &lt;strong data-end=&quot;3030&quot; data-start=&quot;3018&quot;&gt;CircleCI&lt;/strong&gt;.&lt;/li&gt;&lt;/ul&gt;&lt;h3 data-end=&quot;3061&quot; data-start=&quot;3033&quot;&gt;10. &lt;strong data-end=&quot;3061&quot; data-start=&quot;3041&quot;&gt;Tracing (İzleme)&lt;/strong&gt;&lt;/h3&gt;&lt;ul data-end=&quot;3301&quot; data-start=&quot;3065&quot;&gt;&lt;li data-end=&quot;3258&quot; data-start=&quot;3065&quot;&gt;&lt;strong data-end=&quot;3077&quot; data-start=&quot;3067&quot;&gt;Neden?&lt;/strong&gt;: Mikroservisler arasında bir isteğin nasıl aktığını ve her bir mikroservisin ne kadar süre aldığını izlemek gerekir. Bu, performans sorunlarını tanımlamak ve çözmek için kritiktir.&lt;/li&gt;&lt;li data-end=&quot;3301&quot; data-start=&quot;3262&quot;&gt;&lt;strong data-end=&quot;3276&quot; data-start=&quot;3264&quot;&gt;Örnekler&lt;/strong&gt;: &lt;strong data-end=&quot;3288&quot; data-start=&quot;3278&quot;&gt;Jaeger&lt;/strong&gt;, &lt;strong data-end=&quot;3300&quot; data-start=&quot;3290&quot;&gt;Zipkin&lt;/strong&gt;.&lt;/li&gt;&lt;/ul&gt;&lt;h3 data-end=&quot;3369&quot; data-start=&quot;3303&quot;&gt;11. &lt;strong data-end=&quot;3369&quot; data-start=&quot;3311&quot;&gt;Database per Service (Her Servis İçin Ayrı Veritabanı)&lt;/strong&gt;&lt;/h3&gt;&lt;ul data-end=&quot;3695&quot; data-start=&quot;3373&quot;&gt;&lt;li data-end=&quot;3573&quot; data-start=&quot;3373&quot;&gt;&lt;strong data-end=&quot;3385&quot; data-start=&quot;3375&quot;&gt;Neden?&lt;/strong&gt;: Mikroservislerin her biri, kendi veritabanına sahip olmalıdır. Bu, her mikroservisin bağımsız bir şekilde çalışabilmesini ve diğer servislerden bağımsız olarak ölçeklenebilmesini sağlar.&lt;/li&gt;&lt;li data-end=&quot;3695&quot; data-start=&quot;3577&quot;&gt;&lt;strong data-end=&quot;3601&quot; data-start=&quot;3579&quot;&gt;Veritabanı Türleri&lt;/strong&gt;: &lt;strong data-end=&quot;3610&quot; data-start=&quot;3603&quot;&gt;SQL&lt;/strong&gt; (örneğin &lt;strong data-end=&quot;3634&quot; data-start=&quot;3620&quot;&gt;PostgreSQL&lt;/strong&gt;, &lt;strong data-end=&quot;3645&quot; data-start=&quot;3636&quot;&gt;MySQL&lt;/strong&gt;), &lt;strong data-end=&quot;3657&quot; data-start=&quot;3648&quot;&gt;NoSQL&lt;/strong&gt; (örneğin &lt;strong data-end=&quot;3678&quot; data-start=&quot;3667&quot;&gt;MongoDB&lt;/strong&gt;, &lt;strong data-end=&quot;3693&quot; data-start=&quot;3680&quot;&gt;Cassandra&lt;/strong&gt;).&lt;/li&gt;&lt;/ul&gt;&lt;h3 data-end=&quot;3740&quot; data-start=&quot;3697&quot;&gt;12. &lt;strong data-end=&quot;3740&quot; data-start=&quot;3705&quot;&gt;Scalability (Ölçeklenebilirlik)&lt;/strong&gt;&lt;/h3&gt;&lt;ul data-end=&quot;3965&quot; data-start=&quot;3744&quot;&gt;&lt;li data-end=&quot;3912&quot; data-start=&quot;3744&quot;&gt;&lt;strong data-end=&quot;3756&quot; data-start=&quot;3746&quot;&gt;Neden?&lt;/strong&gt;: Mikroservislerin her birinin bağımsız olarak ölçeklenebilmesi gerekir. Bu, sistemin büyüdükçe daha fazla kullanıcıyı ve trafiği karşılayabilmesini sağlar.&lt;/li&gt;&lt;li data-end=&quot;3965&quot; data-start=&quot;3916&quot;&gt;&lt;strong data-end=&quot;3930&quot; data-start=&quot;3918&quot;&gt;Örnekler&lt;/strong&gt;: &lt;strong data-end=&quot;3946&quot; data-start=&quot;3932&quot;&gt;Kubernetes&lt;/strong&gt;, &lt;strong data-end=&quot;3964&quot; data-start=&quot;3948&quot;&gt;Docker Swarm&lt;/strong&gt;.&lt;/li&gt;&lt;/ul&gt;&lt;h3 data-end=&quot;4004&quot; data-start=&quot;3967&quot;&gt;13. &lt;strong data-end=&quot;4004&quot; data-start=&quot;3975&quot;&gt;Resilience (Dayanıklılık)&lt;/strong&gt;&lt;/h3&gt;&lt;ul data-end=&quot;4205&quot; data-start=&quot;4008&quot;&gt;&lt;li data-end=&quot;4155&quot; data-start=&quot;4008&quot;&gt;&lt;strong data-end=&quot;4020&quot; data-start=&quot;4010&quot;&gt;Neden?&lt;/strong&gt;: Mikroservislerin her biri, sistemin genelinde arızalar olsa bile dayanıklı olmalıdır. Bu, hata toleransı ve otomatik iyileşme sağlar.&lt;/li&gt;&lt;li data-end=&quot;4205&quot; data-start=&quot;4159&quot;&gt;&lt;strong data-end=&quot;4173&quot; data-start=&quot;4161&quot;&gt;Örnekler&lt;/strong&gt;: &lt;strong data-end=&quot;4191&quot; data-start=&quot;4175&quot;&gt;Resilience4j&lt;/strong&gt;, &lt;strong data-end=&quot;4204&quot; data-start=&quot;4193&quot;&gt;Hystrix&lt;/strong&gt;.&lt;/li&gt;&lt;/ul&gt;&lt;hr data-end=&quot;4210&quot; data-start=&quot;4207&quot; /&gt;&lt;p data-end=&quot;4443&quot; data-is-last-node=&quot;&quot; data-is-only-node=&quot;&quot; data-start=&quot;4212&quot;&gt;Bu bileşenler, mikroservis mimarisinin verimli bir şekilde çalışabilmesi için kritik unsurlardır. Bunlar, sistemin yüksek erişilebilirliğini, güvenliğini, ölçeklenebilirliğini ve sürdürülebilirliğini sağlayan temel yapı taşlarıdır.&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://mehmetyoldas.blogspot.com/feeds/6302669567392940351/comments/default' title='Kayıt Yorumları'/><link rel='replies' type='text/html' href='http://mehmetyoldas.blogspot.com/2025/03/microservice-mimarisinde-olmazsa.html#comment-form' title='0 Yorum'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5628326400009361051/posts/default/6302669567392940351'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5628326400009361051/posts/default/6302669567392940351'/><link rel='alternate' type='text/html' href='http://mehmetyoldas.blogspot.com/2025/03/microservice-mimarisinde-olmazsa.html' title='Microservice mimarisinde olmazsa olmazlar!'/><author><name>Mehmet Yoldaş</name><uri>http://www.blogger.com/profile/17372934623166164299</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVw6x10V3awMwQJFzrhYEEvr-YMR-YcaKARcY29nS8Ny67irGfpUKqZ4uvXuwn6LQhPqNtJq5NQ4rkOE0x29vlgd4UNHA9D6B3uo8_D6VU7-5TZyDRRW-W6MAgLjn7DA/s220/profil+Ba%C5%9Fak+Foto%C4%9Fraf%C3%A7%C4%B1l%C4%B1k.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5628326400009361051.post-3553131214840769883</id><published>2025-03-02T12:43:00.001+03:00</published><updated>2025-03-02T12:43:51.812+03:00</updated><title type='text'>Microservice mimaride kullanılan önemli bileşenler nelerdir?</title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;ol data-end=&quot;4020&quot; data-start=&quot;189&quot;&gt;&lt;li data-end=&quot;569&quot; data-start=&quot;189&quot;&gt;&lt;p data-end=&quot;229&quot; data-start=&quot;192&quot;&gt;&lt;strong data-end=&quot;228&quot; data-start=&quot;192&quot;&gt;Service Discovery (Hizmet Keşfi)&lt;/strong&gt;:&lt;/p&gt;&lt;ul data-end=&quot;569&quot; data-start=&quot;233&quot;&gt;&lt;li data-end=&quot;322&quot; data-start=&quot;233&quot;&gt;Mikroservislerin dinamik bir şekilde bulunduğu ve birbirine erişebildiği sistemlerdir.&lt;/li&gt;&lt;li data-end=&quot;569&quot; data-start=&quot;326&quot;&gt;&lt;strong data-end=&quot;338&quot; data-start=&quot;328&quot;&gt;Consul&lt;/strong&gt;, &lt;strong data-end=&quot;350&quot; data-start=&quot;340&quot;&gt;Eureka&lt;/strong&gt; ve &lt;strong data-end=&quot;367&quot; data-is-only-node=&quot;&quot; data-start=&quot;354&quot;&gt;Zookeeper&lt;/strong&gt; gibi araçlar kullanılarak mikroservisler birbirlerini keşfedebilir ve iletişim kurabilir. Bu araçlar, servisin hangi sunucuda çalıştığını bilmeden mikroservislerin birbiriyle iletişim kurmasını sağlar.&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li data-end=&quot;885&quot; data-start=&quot;571&quot;&gt;&lt;p data-end=&quot;614&quot; data-start=&quot;574&quot;&gt;&lt;strong data-end=&quot;613&quot; data-start=&quot;574&quot;&gt;Message Broker (Mesajlaşma Sistemi)&lt;/strong&gt;:&lt;/p&gt;&lt;ul data-end=&quot;885&quot; data-start=&quot;618&quot;&gt;&lt;li data-end=&quot;685&quot; data-start=&quot;618&quot;&gt;Mikroservisler arasında asenkron iletişim sağlayan bileşenlerdir.&lt;/li&gt;&lt;li data-end=&quot;885&quot; data-start=&quot;689&quot;&gt;&lt;strong data-end=&quot;703&quot; data-start=&quot;691&quot;&gt;RabbitMQ&lt;/strong&gt;, &lt;strong data-end=&quot;714&quot; data-start=&quot;705&quot;&gt;Kafka&lt;/strong&gt; veya &lt;strong data-end=&quot;741&quot; data-is-only-node=&quot;&quot; data-start=&quot;720&quot;&gt;Azure Service Bus&lt;/strong&gt; gibi araçlar, servisler arasında veri iletimi ve mesajlaşma işlemlerini yönetir. Bu araçlar, event-driven (olay odaklı) mimarilerde kullanılır.&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li data-end=&quot;1190&quot; data-start=&quot;887&quot;&gt;&lt;p data-end=&quot;906&quot; data-start=&quot;890&quot;&gt;&lt;strong data-end=&quot;905&quot; data-start=&quot;890&quot;&gt;API Gateway&lt;/strong&gt;:&lt;/p&gt;&lt;ul data-end=&quot;1190&quot; data-start=&quot;910&quot;&gt;&lt;li data-end=&quot;994&quot; data-start=&quot;910&quot;&gt;&lt;strong data-end=&quot;922&quot; data-start=&quot;912&quot;&gt;Ocelot&lt;/strong&gt; dışında, &lt;strong data-end=&quot;940&quot; data-start=&quot;932&quot;&gt;Kong&lt;/strong&gt; ve &lt;strong data-end=&quot;952&quot; data-is-only-node=&quot;&quot; data-start=&quot;944&quot;&gt;Zuul&lt;/strong&gt; gibi API Gateway çözümleri de popülerdir.&lt;/li&gt;&lt;li data-end=&quot;1190&quot; data-start=&quot;998&quot;&gt;API Gateway, dış dünya ile mikroservisler arasındaki tek giriş noktasıdır ve yük dengeleme, kimlik doğrulama, isteği yönlendirme, hız sınırlama (rate limiting) gibi işlemleri gerçekleştirir.&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li data-end=&quot;1509&quot; data-start=&quot;1192&quot;&gt;&lt;p data-end=&quot;1248&quot; data-start=&quot;1195&quot;&gt;&lt;strong data-end=&quot;1247&quot; data-start=&quot;1195&quot;&gt;Configuration Management (Yapılandırma Yönetimi)&lt;/strong&gt;:&lt;/p&gt;&lt;ul data-end=&quot;1509&quot; data-start=&quot;1252&quot;&gt;&lt;li data-end=&quot;1332&quot; data-start=&quot;1252&quot;&gt;Mikroservislerin tüm konfigürasyon ayarları merkezi bir noktada yönetilebilir.&lt;/li&gt;&lt;li data-end=&quot;1509&quot; data-start=&quot;1336&quot;&gt;&lt;strong data-end=&quot;1348&quot; data-start=&quot;1338&quot;&gt;Consul&lt;/strong&gt;, &lt;strong data-end=&quot;1373&quot; data-start=&quot;1350&quot;&gt;Spring Cloud Config&lt;/strong&gt; veya &lt;strong data-end=&quot;1388&quot; data-is-only-node=&quot;&quot; data-start=&quot;1379&quot;&gt;Vault&lt;/strong&gt; gibi araçlar, konfigürasyonları merkezi bir depoda saklar ve her mikroservise en güncel yapılandırma bilgilerini sağlar.&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li data-end=&quot;1894&quot; data-start=&quot;1511&quot;&gt;&lt;p data-end=&quot;1540&quot; data-start=&quot;1514&quot;&gt;&lt;strong data-end=&quot;1539&quot; data-start=&quot;1514&quot;&gt;Logging (Kayıt Tutma)&lt;/strong&gt;:&lt;/p&gt;&lt;ul data-end=&quot;1894&quot; data-start=&quot;1544&quot;&gt;&lt;li data-end=&quot;1643&quot; data-start=&quot;1544&quot;&gt;Mikroservisler arasında izleme ve hata ayıklama için merkezi bir log toplama ve analiz çözümüdür.&lt;/li&gt;&lt;li data-end=&quot;1791&quot; data-start=&quot;1647&quot;&gt;&lt;strong data-end=&quot;1696&quot; data-start=&quot;1649&quot;&gt;ELK Stack (Elasticsearch, Logstash, Kibana)&lt;/strong&gt;, &lt;strong data-end=&quot;1708&quot; data-start=&quot;1698&quot;&gt;Splunk&lt;/strong&gt;, &lt;strong data-end=&quot;1721&quot; data-is-only-node=&quot;&quot; data-start=&quot;1710&quot;&gt;Fluentd&lt;/strong&gt; gibi araçlar, mikroservislerin loglarını toplar, arar ve analiz eder.&lt;/li&gt;&lt;li data-end=&quot;1894&quot; data-start=&quot;1795&quot;&gt;&lt;strong data-end=&quot;1811&quot; data-start=&quot;1797&quot;&gt;Prometheus&lt;/strong&gt; ve &lt;strong data-end=&quot;1826&quot; data-start=&quot;1815&quot;&gt;Grafana&lt;/strong&gt; gibi araçlar, uygulamanın performansını izler ve metrikleri toplar.&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li data-end=&quot;2180&quot; data-start=&quot;1896&quot;&gt;&lt;p data-end=&quot;1934&quot; data-start=&quot;1899&quot;&gt;&lt;strong data-end=&quot;1933&quot; data-start=&quot;1899&quot;&gt;Circuit Breaker (Devre Kesici)&lt;/strong&gt;:&lt;/p&gt;&lt;ul data-end=&quot;2180&quot; data-start=&quot;1938&quot;&gt;&lt;li data-end=&quot;2062&quot; data-start=&quot;1938&quot;&gt;Mikroservislerin birbirine bağımlı olmasından dolayı, bir servis arızalandığında diğerlerini etkilememesi için kullanılır.&lt;/li&gt;&lt;li data-end=&quot;2180&quot; data-start=&quot;2066&quot;&gt;&lt;strong data-end=&quot;2079&quot; data-start=&quot;2068&quot;&gt;Hystrix&lt;/strong&gt; ve &lt;strong data-end=&quot;2092&quot; data-start=&quot;2083&quot;&gt;Polly&lt;/strong&gt; gibi araçlar, servisin hata durumunda devreyi keser ve sistemin tümünü çökmekten korur.&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li data-end=&quot;2485&quot; data-start=&quot;2182&quot;&gt;&lt;p data-end=&quot;2206&quot; data-start=&quot;2185&quot;&gt;&lt;strong data-end=&quot;2205&quot; data-start=&quot;2185&quot;&gt;Tracing (İzleme)&lt;/strong&gt;:&lt;/p&gt;&lt;ul data-end=&quot;2485&quot; data-start=&quot;2210&quot;&gt;&lt;li data-end=&quot;2363&quot; data-start=&quot;2210&quot;&gt;Mikroservislerin işleyişini takip etmek, performans problemlerini tanımlamak ve her bir isteğin sistem genelindeki yolculuğunu izlemek için kullanılır.&lt;/li&gt;&lt;li data-end=&quot;2485&quot; data-start=&quot;2367&quot;&gt;&lt;strong data-end=&quot;2379&quot; data-start=&quot;2369&quot;&gt;Jaeger&lt;/strong&gt;, &lt;strong data-end=&quot;2391&quot; data-start=&quot;2381&quot;&gt;Zipkin&lt;/strong&gt; gibi araçlar, her bir mikroservisin isteği nasıl işlediğini ve ne kadar zaman aldığını izler.&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li data-end=&quot;2783&quot; data-start=&quot;2487&quot;&gt;&lt;p data-end=&quot;2514&quot; data-start=&quot;2490&quot;&gt;&lt;strong data-end=&quot;2513&quot; data-start=&quot;2490&quot;&gt;Security (Güvenlik)&lt;/strong&gt;:&lt;/p&gt;&lt;ul data-end=&quot;2783&quot; data-start=&quot;2518&quot;&gt;&lt;li data-end=&quot;2650&quot; data-start=&quot;2518&quot;&gt;Mikroservislerin güvenliğini sağlamak için kimlik doğrulama (authentication) ve yetkilendirme (authorization) yönetimi gereklidir.&lt;/li&gt;&lt;li data-end=&quot;2783&quot; data-start=&quot;2654&quot;&gt;&lt;strong data-end=&quot;2666&quot; data-start=&quot;2656&quot;&gt;OAuth2&lt;/strong&gt;, &lt;strong data-end=&quot;2693&quot; data-start=&quot;2668&quot;&gt;JWT (JSON Web Tokens)&lt;/strong&gt;, &lt;strong data-end=&quot;2713&quot; data-is-only-node=&quot;&quot; data-start=&quot;2695&quot;&gt;IdentityServer&lt;/strong&gt; gibi teknolojiler mikroservislerde güvenlik sağlamak için kullanılır.&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li data-end=&quot;3182&quot; data-start=&quot;2785&quot;&gt;&lt;p data-end=&quot;2848&quot; data-start=&quot;2788&quot;&gt;&lt;strong data-end=&quot;2847&quot; data-start=&quot;2788&quot;&gt;Database (Veritabanı) &amp;amp; Data Management (Veri Yönetimi)&lt;/strong&gt;:&lt;/p&gt;&lt;ul data-end=&quot;3182&quot; data-start=&quot;2852&quot;&gt;&lt;li data-end=&quot;2936&quot; data-start=&quot;2852&quot;&gt;Her mikroservis kendi veritabanına sahip olmalıdır (database per service pattern).&lt;/li&gt;&lt;li data-end=&quot;3041&quot; data-start=&quot;2940&quot;&gt;Veritabanı türleri olarak &lt;strong data-end=&quot;2975&quot; data-start=&quot;2968&quot;&gt;SQL&lt;/strong&gt; ve &lt;strong data-end=&quot;2988&quot; data-start=&quot;2979&quot;&gt;NoSQL&lt;/strong&gt; (örneğin &lt;strong data-end=&quot;3009&quot; data-start=&quot;2998&quot;&gt;MongoDB&lt;/strong&gt;, &lt;strong data-end=&quot;3024&quot; data-start=&quot;3011&quot;&gt;Cassandra&lt;/strong&gt;) kullanılabilir.&lt;/li&gt;&lt;li data-end=&quot;3182&quot; data-start=&quot;3045&quot;&gt;&lt;strong data-end=&quot;3065&quot; data-start=&quot;3047&quot;&gt;Event sourcing&lt;/strong&gt; ve &lt;strong data-end=&quot;3120&quot; data-start=&quot;3069&quot;&gt;CQRS (Command Query Responsibility Segregation)&lt;/strong&gt; gibi desenler, veri yönetimini daha verimli hale getirebilir.&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li data-end=&quot;3479&quot; data-start=&quot;3184&quot;&gt;&lt;p data-end=&quot;3258&quot; data-start=&quot;3188&quot;&gt;&lt;strong data-end=&quot;3221&quot; data-start=&quot;3188&quot;&gt;Containerization (Kapsülleme)&lt;/strong&gt; ve &lt;strong data-end=&quot;3257&quot; data-start=&quot;3225&quot;&gt;Orchestration (Orkestrasyon)&lt;/strong&gt;:&lt;/p&gt;&lt;ul data-end=&quot;3479&quot; data-start=&quot;3263&quot;&gt;&lt;li data-end=&quot;3353&quot; data-start=&quot;3263&quot;&gt;&lt;strong data-end=&quot;3275&quot; data-start=&quot;3265&quot;&gt;Docker&lt;/strong&gt; ile mikroservisler kapsüllenebilir, böylece bağımsız olarak çalıştırılabilir.&lt;/li&gt;&lt;li data-end=&quot;3479&quot; data-start=&quot;3358&quot;&gt;&lt;strong data-end=&quot;3374&quot; data-start=&quot;3360&quot;&gt;Kubernetes&lt;/strong&gt; ve &lt;strong data-end=&quot;3394&quot; data-start=&quot;3378&quot;&gt;Docker Swarm&lt;/strong&gt; gibi orkestrasyon araçları, kapsülleri yönetir ve dağıtım işlemleri kolaylaştırılır.&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li data-end=&quot;3764&quot; data-start=&quot;3481&quot;&gt;&lt;p data-end=&quot;3542&quot; data-start=&quot;3485&quot;&gt;&lt;strong data-end=&quot;3541&quot; data-start=&quot;3485&quot;&gt;CI/CD (Continuous Integration/Continuous Deployment)&lt;/strong&gt;:&lt;/p&gt;&lt;ul data-end=&quot;3764&quot; data-start=&quot;3547&quot;&gt;&lt;li data-end=&quot;3636&quot; data-start=&quot;3547&quot;&gt;Mikroservislerin geliştirilmesi ve dağıtımı süreçlerinin otomatikleştirilmesini sağlar.&lt;/li&gt;&lt;li data-end=&quot;3764&quot; data-start=&quot;3641&quot;&gt;&lt;strong data-end=&quot;3654&quot; data-start=&quot;3643&quot;&gt;Jenkins&lt;/strong&gt;, &lt;strong data-end=&quot;3669&quot; data-start=&quot;3656&quot;&gt;GitLab CI&lt;/strong&gt;, &lt;strong data-end=&quot;3683&quot; data-is-only-node=&quot;&quot; data-start=&quot;3671&quot;&gt;CircleCI&lt;/strong&gt; gibi araçlar, yazılımın sürekli olarak entegre edilmesi ve dağıtılmasını sağlar.&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li data-end=&quot;4020&quot; data-start=&quot;3766&quot;&gt;&lt;p data-end=&quot;3794&quot; data-start=&quot;3770&quot;&gt;&lt;strong data-end=&quot;3793&quot; data-start=&quot;3770&quot;&gt;Monitoring (İzleme)&lt;/strong&gt;:&lt;/p&gt;&lt;ul data-end=&quot;4020&quot; data-start=&quot;3799&quot;&gt;&lt;li data-end=&quot;3877&quot; data-start=&quot;3799&quot;&gt;Mikroservislerin sağlığını ve performansını sürekli izlemek için kullanılır.&lt;/li&gt;&lt;li data-end=&quot;4020&quot; data-start=&quot;3882&quot;&gt;&lt;strong data-end=&quot;3898&quot; data-start=&quot;3884&quot;&gt;Prometheus&lt;/strong&gt;, &lt;strong data-end=&quot;3911&quot; data-start=&quot;3900&quot;&gt;Grafana&lt;/strong&gt;, &lt;strong data-end=&quot;3924&quot; data-is-only-node=&quot;&quot; data-start=&quot;3913&quot;&gt;Datadog&lt;/strong&gt;, &lt;strong data-end=&quot;3939&quot; data-start=&quot;3926&quot;&gt;New Relic&lt;/strong&gt; gibi araçlar, servislerin durumunu, kullanılabilirliğini ve performansını izler.&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p data-end=&quot;4226&quot; data-is-last-node=&quot;&quot; data-is-only-node=&quot;&quot; data-start=&quot;4022&quot;&gt;Mikroservis mimarisi, bu bileşenlerin birleşimiyle daha etkili ve ölçeklenebilir bir yapı oluşturur. Bu araçlar ve yöntemler, mikroservislerin güvenli, hızlı ve esnek bir şekilde çalışmasına olanak tanır.&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://mehmetyoldas.blogspot.com/feeds/3553131214840769883/comments/default' title='Kayıt Yorumları'/><link rel='replies' type='text/html' href='http://mehmetyoldas.blogspot.com/2025/03/microservice-mimaride-kullanlan-onemli.html#comment-form' title='0 Yorum'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5628326400009361051/posts/default/3553131214840769883'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5628326400009361051/posts/default/3553131214840769883'/><link rel='alternate' type='text/html' href='http://mehmetyoldas.blogspot.com/2025/03/microservice-mimaride-kullanlan-onemli.html' title='Microservice mimaride kullanılan önemli bileşenler nelerdir?'/><author><name>Mehmet Yoldaş</name><uri>http://www.blogger.com/profile/17372934623166164299</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVw6x10V3awMwQJFzrhYEEvr-YMR-YcaKARcY29nS8Ny67irGfpUKqZ4uvXuwn6LQhPqNtJq5NQ4rkOE0x29vlgd4UNHA9D6B3uo8_D6VU7-5TZyDRRW-W6MAgLjn7DA/s220/profil+Ba%C5%9Fak+Foto%C4%9Fraf%C3%A7%C4%B1l%C4%B1k.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5628326400009361051.post-7931915044120394752</id><published>2025-03-02T12:41:00.000+03:00</published><updated>2025-03-02T12:41:04.656+03:00</updated><title type='text'>Microsevice mimarisinde Ocelot&#39;un yeri ve önemi</title><content type='html'>&lt;p&gt;&amp;nbsp;Ocelot, .NET Core tabanlı bir açık kaynaklı API Gateway çözümüdür ve mikroservis mimarisinde sıklıkla kullanılır. Ocelot, mikroservislerin dış dünyaya sunduğu servislerin birleştiği ve bir araya getirildiği bir noktadır. Bu, çeşitli mikroservislerin tek bir giriş noktası üzerinden erişilebilir olmasını sağlar. Ocelot, HTTP isteklerini yönlendirme, yönlendirme (routing), yük dengeleme, kimlik doğrulama ve yetkilendirme gibi önemli özellikler sunar.&lt;/p&gt;&lt;p data-end=&quot;523&quot; data-start=&quot;453&quot;&gt;Mikroservis mimarisinde Ocelot&#39;un başlıca kullanım alanları şunlardır:&lt;/p&gt;&lt;ol data-end=&quot;1373&quot; data-start=&quot;525&quot;&gt;&lt;li data-end=&quot;672&quot; data-start=&quot;525&quot;&gt;&lt;p data-end=&quot;672&quot; data-start=&quot;528&quot;&gt;&lt;strong data-end=&quot;543&quot; data-start=&quot;528&quot;&gt;API Gateway&lt;/strong&gt;: Mikroservislerinizi dış dünyaya sunan tek bir nokta sağlar. Ocelot, API&#39;lere gelen istekleri uygun mikroservislere yönlendirir.&lt;/p&gt;&lt;/li&gt;&lt;li data-end=&quot;813&quot; data-start=&quot;674&quot;&gt;&lt;p data-end=&quot;813&quot; data-start=&quot;677&quot;&gt;&lt;strong data-end=&quot;688&quot; data-start=&quot;677&quot;&gt;Routing&lt;/strong&gt;: Gelen HTTP isteklerini doğru mikroservislere yönlendirme işlemi sağlar. Yönlendirme yapılandırması JSON formatında yapılır.&lt;/p&gt;&lt;/li&gt;&lt;li data-end=&quot;942&quot; data-start=&quot;815&quot;&gt;&lt;p data-end=&quot;942&quot; data-start=&quot;818&quot;&gt;&lt;strong data-end=&quot;836&quot; data-start=&quot;818&quot;&gt;Load Balancing&lt;/strong&gt;: Ocelot, gelen isteklerin birden fazla mikroservis instance&#39;ına dengeli bir şekilde dağıtılmasını sağlar.&lt;/p&gt;&lt;/li&gt;&lt;li data-end=&quot;1067&quot; data-start=&quot;944&quot;&gt;&lt;p data-end=&quot;1067&quot; data-start=&quot;947&quot;&gt;&lt;strong data-end=&quot;981&quot; data-start=&quot;947&quot;&gt;Authorization &amp;amp; Authentication&lt;/strong&gt;: Ocelot, OAuth2, JWT gibi kimlik doğrulama ve yetkilendirme protokollerini destekler.&lt;/p&gt;&lt;/li&gt;&lt;li data-end=&quot;1174&quot; data-start=&quot;1069&quot;&gt;&lt;p data-end=&quot;1174&quot; data-start=&quot;1072&quot;&gt;&lt;strong data-end=&quot;1095&quot; data-start=&quot;1072&quot;&gt;Request Aggregation&lt;/strong&gt;: Farklı mikroservislerden gelen veriyi birleştirerek, tek bir cevap dönebilir.&lt;/p&gt;&lt;/li&gt;&lt;li data-end=&quot;1296&quot; data-start=&quot;1176&quot;&gt;&lt;p data-end=&quot;1296&quot; data-start=&quot;1179&quot;&gt;&lt;strong data-end=&quot;1209&quot; data-start=&quot;1179&quot;&gt;Rate Limiting &amp;amp; Throttling&lt;/strong&gt;: API isteklerine sınırlamalar getirebilir, böylece servisler fazla yük altında kalmaz.&lt;/p&gt;&lt;/li&gt;&lt;li data-end=&quot;1373&quot; data-start=&quot;1298&quot;&gt;&lt;p data-end=&quot;1373&quot; data-start=&quot;1301&quot;&gt;&lt;strong data-end=&quot;1312&quot; data-start=&quot;1301&quot;&gt;Caching&lt;/strong&gt;: Yanıtları önbelleğe alarak performans iyileştirmesi sağlar.&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p data-end=&quot;1616&quot; data-is-last-node=&quot;&quot; data-is-only-node=&quot;&quot; data-start=&quot;1375&quot;&gt;Ocelot, mikroservis mimarisinin yönetimini daha verimli hale getirmek için çok faydalı bir araçtır. Uygulama içinde merkezi bir kontrol noktası oluşturarak, mikroservislerin birbirleriyle iletişimini kolaylaştırır ve yönetimini sadeleştirir.&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://mehmetyoldas.blogspot.com/feeds/7931915044120394752/comments/default' title='Kayıt Yorumları'/><link rel='replies' type='text/html' href='http://mehmetyoldas.blogspot.com/2025/03/microsevice-mimarisinde-ocelotun-yeri.html#comment-form' title='0 Yorum'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5628326400009361051/posts/default/7931915044120394752'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5628326400009361051/posts/default/7931915044120394752'/><link rel='alternate' type='text/html' href='http://mehmetyoldas.blogspot.com/2025/03/microsevice-mimarisinde-ocelotun-yeri.html' title='Microsevice mimarisinde Ocelot&#39;un yeri ve önemi'/><author><name>Mehmet Yoldaş</name><uri>http://www.blogger.com/profile/17372934623166164299</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVw6x10V3awMwQJFzrhYEEvr-YMR-YcaKARcY29nS8Ny67irGfpUKqZ4uvXuwn6LQhPqNtJq5NQ4rkOE0x29vlgd4UNHA9D6B3uo8_D6VU7-5TZyDRRW-W6MAgLjn7DA/s220/profil+Ba%C5%9Fak+Foto%C4%9Fraf%C3%A7%C4%B1l%C4%B1k.jpg'/></author><thr:total>0</thr:total></entry></feed>