<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by İbrahim Karahan on Medium]]></title>
        <description><![CDATA[Stories by İbrahim Karahan on Medium]]></description>
        <link>https://medium.com/@ikarahan?source=rss-c3634086005b------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*PeoTNXeGqG2-U0-J76N2Ag.jpeg</url>
            <title>Stories by İbrahim Karahan on Medium</title>
            <link>https://medium.com/@ikarahan?source=rss-c3634086005b------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 22 Nov 2026 09:37:42 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ikarahan/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Experience with Couchbase Elasticsearch Connector Modes]]></title>
            <link>https://medium.com/@ikarahan/experience-with-couchbase-elasticsearch-connector-modes-44b458355c65?source=rss-c3634086005b------2</link>
            <guid isPermaLink="false">https://medium.com/p/44b458355c65</guid>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[elasticsearch]]></category>
            <category><![CDATA[consul]]></category>
            <category><![CDATA[couchbase]]></category>
            <dc:creator><![CDATA[İbrahim Karahan]]></dc:creator>
            <pubDate>Fri, 13 Oct 2023 12:54:19 GMT</pubDate>
            <atom:updated>2023-10-13T12:57:45.407Z</atom:updated>
            <content:encoded><![CDATA[<p>Hi everybody, with <a href="https://medium.com/u/d132e74e7012">Burak Gundogdu</a>, we want to share our experiences on couchbase elasticsearch connector modes and also the migration of the couchbase elasticsearch connector from Distributed to Autonomous Operations mode. Couchbase elasticsearch connector is used for replicating documents from the couchbase server to elasticsearch via database change protocol(DCP). The connector runs three different modes Solo, Distributed, and Autonomous Operations.</p><p>Solo mode is the simplest mode that runs as a single standalone Java process. Solo mode is proper for low-traffic environments.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9HUHM1WIziguuON8C7Vc8g.png" /><figcaption>Solo Mode</figcaption></figure><p>Distrubuted mode runs as multiple processes and each process is manually configured to handle only a subset of the replication workload. Distrubuted mode handle high volumes of traffic but it is inflexible due to manual configuration.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0uxPa5W0cILQFXI-rUk4Iw.png" /><figcaption>Distributed Mode</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BeJpz6udJ0Np6g2Lh3vvZg.png" /><figcaption>Distributed Mode Scalability and Flexibility Problem</figcaption></figure><p>Autonomous operations mode runs similarly to distributed mode but coordination is handled by HashiCorp Consul. It can handle high-volume traffic and is flexible. Connector instances can easily join or leave the group without shutdown, reconfiguration is handled on-the-fly.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TCLjm5FehGIC-G5FMbGAMw.png" /><figcaption>Autonomous Operation Mode</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iP37ZuwLGpY0Q2irMUFByg.png" /><figcaption>Autonomous Operation Mode Scalability and Flexibility Solution with Consul</figcaption></figure><p>In our use case, we use distributed mode for the connector but we encounter problems with scalability and flexibility. When one of our manually configured instances is down we cannot replicate related documents and reconfiguration is applied after shutting down all instances. When we want to replicate all documents we consume time for the connector to complete workloads also It takes a lot of effort to scale. For the reasons mentioned, we decided to migrate to autonomous operations mode.</p><p>The most important point in migration is the version compatibility of each component. We consume a lot of effort to find the solution for the problem but the <a href="https://docs.couchbase.com/elasticsearch-connector/current/getting-started.html">documentation</a> is so clear, you need to give caution to <a href="https://docs.couchbase.com/elasticsearch-connector/current/compatibility.html">compatibility</a>. You need to give the same group name when pushing config to consul and also running each connector. You need to give a unique service ID to each connector.</p><p><strong><em>The only problem we encountered after long-term use and experience was when we scaled the connector quickly, all connectors restarted, and they didn’t run again. The problem is solved when we scale connectors slowly, step by step. The other solution is to upgrade the connector version to the latest.</em></strong></p><p>To sum up, if you handle high-volume traffic and want scalability and flexibility, you can use Couchbase Elasticsearch Connector Autonomous Operations Mode.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=44b458355c65" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Microservice Pattern Kitap Özeti ]]></title>
            <link>https://medium.com/@ikarahan/microservice-pattern-kitap-%C3%B6zeti-3ebe20727587?source=rss-c3634086005b------2</link>
            <guid isPermaLink="false">https://medium.com/p/3ebe20727587</guid>
            <dc:creator><![CDATA[İbrahim Karahan]]></dc:creator>
            <pubDate>Wed, 14 Jun 2023 07:28:48 GMT</pubDate>
            <atom:updated>2023-06-14T07:28:48.806Z</atom:updated>
            <content:encoded><![CDATA[<p>Başlığından da anlaşılacağı gibi, yazılım dünyasında son yıllarda büyük bir popülerlik kazanan mikroservis mimarisi, uygulama geliştirmede devrim niteliğinde bir yaklaşım olarak ortaya çıkmıştır. Bu yenilikçi mimari yaklaşımı anlamak ve etkili bir şekilde uygulamak isteyenler için Chris Richardson tarafından kaleme alınan “Microservices Patterns” adlı kitap, kapsamlı bir kaynak sunmaktadır.</p><p>Bu yazı, kitap içerisinde bulunan bölümlerin Türkçe özetlerini sunmayı amaçlamaktadır. Ayrıca mikroservis mimarisini anlamak ve benimsemek isteyenler için Türkçe kaynakları artırmaktır. Mikroservis mimarisi hakkında daha fazla bilgi edinmek ve bu yaklaşımı benimseyerek yazılım projelerinizi optimize etmek isteyenler için, bu yazı kaynak oluşturmayı hedeflemektedir.</p><p>Kitap, mikroservis mimarisiyle ilgili temel kavramları ve ilkeleri kapsamlı bir şekilde ele almakta ve bu mimariyi uygularken karşılaşılan yaygın sorunlara pratik çözümler sunmaktadır. Ayrıca, mikroservislerin iletişimi, veri yönetimi, hata toleransı, güvenlik ve izleme gibi konuları ele alan çeşitli patternleri de ayrıntılı bir şekilde incelenmektedir. Günümüzde, yazılım projeleri giderek daha karmaşık hale gelmekte ve büyük monolitik uygulamalardan daha esnek ve ölçeklenebilir bir yaklaşım gerekmektedir. Bu nedenle, mikroservisler, ekiplerin daha bağımsız çalışmasını sağlayan, hızlı dağıtım ve ölçeklendirme imkanı sunan ve genel sistem performansını iyileştiren bir çözüm sunmaktadır.</p><h4>Bölüm 1: Monolitik Cehennemden Kaçış</h4><ul><li>Monolitik mimariler, uygulamayı tek bir dağıtılabilir birim olarak yapılandırır.</li><li>Microservice mimarisi, bir sistemi bağımsız olarak dağıtılabilir yapılara ayırır ve her birinin kendi veritabanına sahip olmasını sağlar.</li><li>Monolitik mimariler basit uygulamalar için iyi bir seçenekken, mikroservice mimarisi genellikle büyük ve karmaşık uygulamalar için daha iyi bir seçimdir.</li><li>Mikroservice mimarisi, küçük, özerk ekiplerin paralel olarak çalışmasını sağlayarak yazılım geliştirme hızını artırır.</li><li>Mikroservice mimarisi her zaman en iyi seçenek değildir ve karmaşıklık gibi önemli dezavantajları vardır.</li><li>Mikroservice mimarisi patternleri, mikroservice mimarisini kullanmanıza karar vermenize yardımcı olan ve eğer mikroservice mimarisini seçerseniz, etkili bir şekilde uygulamanıza yardımcı olan patternlerin bir koleksiyonudur.</li><li>Ürün geliştirme sürecini hızlandırmak için sadece mikroservice mimarisine ihtiyacınız yoktur. Başarılı bir yazılım geliştirme için ayrıca DevOps ve küçük, özerk ekipler gereklidir.</li><li>Mikroservice mimarisine geçişte insan faktörünü unutmamalısınız. Başarılı bir şekilde mikroservice mimarisine geçmek için çalışanların duygularını da dikkate almanız gerekmektedir.</li></ul><h4>Bölüm 2: Ayrıştırma Stratejileri</h4><ul><li>Mimari, sürdürülebilirlik, test edilebilirlik ve dağıtılabilirlik gibi uygulamanızın özelliklerini belirler ve bu doğrudan geliştirme hızını etkiler.</li><li>Mikroservice mimarisi, bir uygulamaya yüksek sürdürülebilirlik, test edilebilirlik ve dağıtılabilirlik sağlayan bir mimari stilidir.</li><li>Mikroservice mimarisi içindeki servisler, teknik endişeler yerine business endişeleri etrafında düzenlenir.</li><li>Ayrıştırma için iki desen vardır:</li><li>Business yeteneğine göre ayrıştırma, business mimarisinden kaynaklanır.</li><li>Subdomainlere göre ayrıştırma, domain-driven design (DDD) kavramlarına dayanır.</li><li>DDD’yi uygulayarak ve her servis için ayrı bir domain modeli tanımlayarak ayrışmayı engelleyen karışık bağımlılıklara neden olan “god class”ları ortadan kaldırabilirsiniz.</li></ul><h4>Bölüm 3: Mikroservice Mimarisinde Süreçler Arası İletişim</h4><ul><li>Mikroservice mimarisi dağıtık bir mimari olduğundan, süreçler arası iletişim önemli bir rol oynar.</li><li>Bir servisin API’sinin evrimini dikkatli bir şekilde yönetmek önemlidir. Geriye uyumlu değişiklikler, müşterileri etkilemediği için en kolay yapılan değişikliklerdir. Bir hizmetin API’sinde köklü bir değişiklik yaparsanız, genellikle müşterileri güncellenene kadar eski ve yeni sürümleri desteklemesi gerekecektir.</li><li>Farklı kazanımları olan birçok IPC (süreçler arası iletişim) teknolojisi bulunmaktadır. Birincil tasarım kararlarından biri, ya senkron uzak prosedür çağrısı modelini veya asenkron mesajlaşma modelini seçmektir. REST gibi senkron uzak prosedür çağrısı tabanlı protokoller en kolay kullanılanlardır. Ancak servislerin mümkünse erişebilirliği arttırmak için asenkron mesajlaşma kullanarak iletişim kurması idealdir.</li><li>Senkron protokol kullanan bir servis, bir servis istek sırasında servisin ulaşılamıyor olması ya da yüksek gecikme süresi göstermesi durumunda kısmi başarısızlıklarla başa çıkacak şekilde tasarlanmalıdır. Özellikle istek yaparken zaman aşımı kullanmalı, bekleyen istek sayısını sınırlamalı ve başarısız olan bir servise istek yapmaktan kaçınmak için Circuit Breaker Pattern kullanmalıdır.</li><li>Senkron protokoller kullanan bir mimaride, istemcilerin hizmet örneğinin ağ konumunu belirlemek için bir service discovery içermesi gerekir. En basit yaklaşım, dağıtım platformu tarafından uygulanan service discovery kullanmaktır: Server-side discovery ve 3rd party registration patterns. Ancak alternatif bir yaklaşım, service discovery uygulama seviyesinde gerçekleştirmektir: Client-side discovery ve Self registration patterns. Daha fazla çalışma gerektirse de, bu yaklaşım hizmetlerin birden fazla dağıtım platformunda çalıştığı senaryoyu ele alır.</li><li>Bir mesaj tabanlı mimari tasarlamak için mesajlar ve kanallar modelini kullanmak iyi bir yaklaşımdır. Bu model, altta yatan mesajlaşma sistemine ilişkin detayları soyutlar. Ardından, bu tasarımı genellikle mesaj aracılık sistemine(message broker) dayalı olan belirli bir mesajlaşma altyapısına eşleyebilirsiniz.</li><li>Mesajlaşma kullanırken karşılaşılan önemli bir zorluk, veritabanını atomik olarak güncellemek ve bir mesaj yayınlamaktır. İyi bir çözüm, Transactional outbox pattern kullanmaktır. Bu pattern, mesajı veritabanına işlem sırasında yazmak üzere kaydederiz. Ardından ayrı bir süreç, mesajı veritabanından Polling publisher pattern veya Transaction log tailing pattern kullanarak alır ve mesajı mesaj aracısına(message broker) yayınlar.</li></ul><p>Diğer bölümler bir sonraki yazıda sizlerle olacak 😃</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3ebe20727587" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Measure Performance of Endpoint with k6]]></title>
            <link>https://medium.com/@ikarahan/measure-performance-of-endpoint-with-k6-cb01048031f5?source=rss-c3634086005b------2</link>
            <guid isPermaLink="false">https://medium.com/p/cb01048031f5</guid>
            <category><![CDATA[k6]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[backend-development]]></category>
            <category><![CDATA[load-testing]]></category>
            <dc:creator><![CDATA[İbrahim Karahan]]></dc:creator>
            <pubDate>Thu, 30 Jun 2022 08:06:48 GMT</pubDate>
            <atom:updated>2022-06-30T08:06:48.201Z</atom:updated>
            <content:encoded><![CDATA[<p>Hi everybody! In this article, I will try to explain k6 to you from the perspective of the software development engineer. As a software development engineer, we have responsibilities such as implementing services and endpoints which are working even if load is high. Have you ever tried to measure performance of the endpoint after the development phase completed? Generally software development engineers trust the software quality engineer but we can measure our endpoints performance easily with help of <a href="https://k6.io/">k6</a>.</p><p><strong>k6</strong></p><p>k6 is an open-source load testing tool that makes performance testing easy and productive for engineering teams. It was originally developed by the load impact company then acquired by <a href="https://grafana.com/">Grafana Labs</a>. It is optimized for minimal resource consumption and designed for running high load tests. <a href="https://k6.io/docs/">Key features of the k6 listed as below</a>:</p><ul><li>CLI tool with developer-friendly APIs</li><li>Scripting with Javascript with support for local and remote modules</li><li>Checks and Thresholds- for goal-oriented, automation-friendly load testing</li></ul><p>Now that we have an introductory knowledge about the k6, we can get our hands dirty.</p><p><strong>Installation</strong></p><p><strong>For macOS:</strong></p><pre><em>brew install k6</em></pre><p>For the other operating system, you can check <a href="https://k6.io/docs/getting-started/installation/">here</a>.</p><p><strong>Test Cycle</strong></p><p>There are three phases in k6 such as import dependencies, define test duration/stage and define VU code.</p><pre>import http from &#39;k6/http&#39;;           // import dependencies<br>import {sleep, check, group} from &#39;k6&#39;;<br><br>export const <strong><em>options </em></strong>= {       // define test stages and duration<br>    stages: [<br>        {target: 5, duration: &#39;10s&#39;},  // ramp-up<br>        {target: 10, duration: &#39;20s&#39;},  // peak point<br>        {target: 0, duration: &#39;10s&#39;},  // ramp-down<br>    ],<br>};<br><br>export default function () {     // VU code<br>    group(&#39;example-service load testing&#39;, function () {<br>        group(&quot;example-endpoint load test&quot;, function (){<br>            let res = http.get(SERVICE_URL);<br><br>            check(res, {<br>                &quot;status is 200&quot;: (r) =&gt; r.status === 200<br>            });<br>        })<br>    });<br><br>    sleep(1);<br>}</pre><p>As you see, first of all, we need to import dependencies that we used in the implementation. Then we can define the test duration and stage. We can create different performance test scenarios by changing test duration and stages. (<em>Shared scenario is prepared for load testing</em>) At VU code definition, we define the work that each virtual user will do. In our scenario each virtual user tries to get a response from a given endpoint.</p><p><strong>Running k6</strong></p><p>We can run our test scenarios in our local machine or in k6 cloud. When we run it locally, the number of virtual users is limited as the resources of the computer we use. Cloud option provide different variety of feature such as region test…etc</p><pre>k6 run <em>&lt;fileName&gt;</em></pre><p><a href="https://k6.io/docs/">JavaScript is not generally well suited for high performance. To achieve maximum performance, the tool itself is written in Go, embedding a JavaScript runtime allowing for easy test scripting.</a></p><p><strong>Result of k6</strong></p><p>After running our first test scenario, we face the result as shared below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/879/1*3KDqI7-0OKzH2e63PqWWzw.png" /><figcaption>Result of example load test scenario</figcaption></figure><p>Result contains test details, progress bar and test summary. Test details contain information about execution, script filename and scenarios. The most valuable information shared at the test summary. Test summary contains information of the endpoint performance. It gives the number of requests and time taken for each request and like that.</p><p><strong>CI/CD with k6</strong></p><p>We can add k6 to our pipeline and we can run it manually before the deployment. You can use the shared script for adding the pipeline. Also you can define cron jobs to periodically measure the performance of the endpoint.</p><pre>stages:<br>  - load-test<br><br>image:<br>  name: ubuntu:latest<br><br>stage-load-test:<br>  image:<br>    name: loadimpact/k6:latest<br>    entrypoint: [&#39;&#39;]<br>  stage: load-test<br>  script:<br>    - echo &quot;executing local k6 in k6 container...&quot;<br>    - k6 run ./example-service/load-test.js</pre><p>To sum up, we can easily create our test scenarios and measure our endpoint performance which is implemented newly. Before the production we can get an inspection about the endpoint and we can take action before the incident. All processes are implemented easily with the help of k6.</p><p><a href="https://github.com/ibrahimkarahan47/load-test">GitHub projet link</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cb01048031f5" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>