<?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 Stefan Kolesnikowicz on Medium]]></title>
        <description><![CDATA[Stories by Stefan Kolesnikowicz on Medium]]></description>
        <link>https://medium.com/@stekole?source=rss-aae990837eda------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*knWOK6mbuWTRxzwFVPxHWA.jpeg</url>
            <title>Stories by Stefan Kolesnikowicz on Medium</title>
            <link>https://medium.com/@stekole?source=rss-aae990837eda------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 03 Dec 2026 14:32:06 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@stekole/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[An Incident Lifecycle back in 2008]]></title>
            <link>https://stekole.medium.com/an-incident-lifecycle-back-in-2008-2de146dd8cf5?source=rss-aae990837eda------2</link>
            <guid isPermaLink="false">https://medium.com/p/2de146dd8cf5</guid>
            <category><![CDATA[monitoring]]></category>
            <category><![CDATA[incident-management]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[observability]]></category>
            <category><![CDATA[site-reliability-engineer]]></category>
            <dc:creator><![CDATA[Stefan Kolesnikowicz]]></dc:creator>
            <pubDate>Tue, 31 Dec 2024 14:07:49 GMT</pubDate>
            <atom:updated>2024-12-31T14:07:49.479Z</atom:updated>
            <content:encoded><![CDATA[<p>2008 was a landmark year: a major economic downturn, Obama’s historic election, the Beijing Olympics — and let’s not forget how Flo Rida kept us dancing through it all.</p><p>It was also the fifth anniversary of <a href="https://sre.google/">Google’s SRE definition</a>, though most of those ideas were still abstract, if they were even known, by many in the industry. PagerDuty didn’t yet exist.</p><p>But incidents certainly did. In my case, they happened a lot either due to a software or a hardware issue. I managed over 30,000 servers in datacenters across the globe. Back then, there was essentially no dedicated software to help us manage any part of the incident lifecycle. Alerting, assembling teams, managing incident communications, and <a href="https://rootly.com/blog/how-to-run-effective-blameless-postmortems">conducting postmortems</a> were all painfully manual tasks.</p><p>As we approach a quarter-century milestone, I want to share what it was like managing incidents before today’s robust tooling was even imagined.</p><h3>How Alerting Looked Like 16 Years Ago</h3><p>Back in 2008, I worked in a Network Operations Center (NOC), spending <em>12-hour shifts</em> glaring at a maze of little black terminal windows and a wall of blue screens. The mission? Watch for red. When red appeared, fix it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*znSo0uh4lxs0zwxi.png" /><figcaption>Imagine these are a wall of blue screens which you need to watch for 12 hours and wait for something to break.</figcaption></figure><p>Sometimes there’d be a flood of red, and if my team couldn’t handle it, we became the human alerting system — escalating to someone, who would call someone else, who was probably at the pub with the one person who actually knew what was wrong. They’d most likely stumble into a cab together, head to the data center, and turn something off and back on again.</p><h3>The Art of Incident Communications in Meltdown Mode</h3><p>During these chaotic moments, you’d have to pause and update customers and employees. Try juggling a call, furiously typing commands, reviewing logs, and writing updates about an ongoing meltdown. The tool of choice? A hand-me-down webserver, often holding on for dear life itself. Quickly being starved for its minimum vital resources.</p><p>The pressure only grew when a manager popped online demanding a timeline and updates.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/968/0*rZ5hflnqTUi5yJx0.png" /></figure><p>It wasn’t just my manager asking for updates. At any given moment, three or four other people could call, message, or knock on the NOC door looking for information. Without a consistent feedback loop — like a live status page — there was no simple way to reassure stakeholders or customers that the incident was being actively addressed.</p><h3>Old School Post-mortems</h3><p>Eventually, the dream team would call from the data center (with beer, because it was Friday night). Everything would be resolved, and after a quick firewall power cycle, the phone would ring again. It was the Incident Manager checking in, curious about the next update and whether we had a root cause analysis yet. No pressure, right?</p><p>Later that night, standing outside with my emergency coffee, I’d look up at our third-floor command center. Those big blue monitoring screens lit up the night like a scene from a tech-noir film. I’d wonder about the future of incident management — and seriously, why no one had ever invested in blinds.</p><h3>15/16 years forward</h3><p>Compared to those times, the two most significant takeaways for me are the evolution of monitoring and the way we now rely on tools to manage an incident’s lifecycle.</p><h4>In-House Monitoring: Probably Not the Best Idea</h4><p>The monitoring landscape has evolved dramatically since my blue screen wall days. Companies have moved from “follow-the-sun” support to smart alerting systems that page and escalate automatically. Monitoring systems themselves are now highly sophisticated, but this creates new challenges: ensuring they’re reliable.</p><p>Managing your own in-house monitoring solution can be a liability. My recommendation? Let today’s observability platforms do what they do best. Removing the stress of ensuring the reliability and scalability of your monitoring platform is a worthy investment.</p><h4>Delegate Incident Tasks to Your Tooling</h4><p>Taking on too much responsibility during an outage often leads to mistakes in post-incident reviews. Today, we have tools that document events in real-time, reducing human error.</p><p>Solutions like <a href="https://rootly.com/">Rootly</a> handle timeline summaries automatically, cutting out manual detective work so teams can focus on fixing issues.</p><p>In today’s world of automation, alerting, and AI-generated summaries, fewer eyeballs need to stare at blue screens 24/7. Status pages now connect directly to observability tools, giving customers real-time updates instead of waiting for an under-caffeinated NOC engineer to compile reports. Automation minimizes human error — and stress.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2de146dd8cf5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Load testing Kubernetes: Resolving bottlenecks and improving performance (Part 2)]]></title>
            <link>https://achievers.engineering/load-testing-kubernetes-resolving-bottlenecks-and-improving-performance-part-2-c4f08102f105?source=rss-aae990837eda------2</link>
            <guid isPermaLink="false">https://medium.com/p/c4f08102f105</guid>
            <category><![CDATA[load-testing]]></category>
            <category><![CDATA[istio]]></category>
            <category><![CDATA[distributed-systems]]></category>
            <category><![CDATA[sre]]></category>
            <category><![CDATA[kubernetes]]></category>
            <dc:creator><![CDATA[Stefan Kolesnikowicz]]></dc:creator>
            <pubDate>Wed, 22 Nov 2023 17:34:19 GMT</pubDate>
            <atom:updated>2023-11-22T17:34:19.368Z</atom:updated>
            <content:encoded><![CDATA[<h3>Load Testing Kubernetes: Resolving bottlenecks and improving performance (Part 2)</h3><p><a href="https://achievers.engineering/load-testing-kubernetes-building-a-framework-part-1-bdc0af4ae7e2">In the first part of this series,</a> I spoke on how <a href="https://www.achievers.com/">Achievers</a> built a load testing framework to help our engineering teams understand how our platform performs under unexpected load. The team was able to improve overall platform performance, allow for <em>4x</em> more traffic throughput, and scale clusters more effectively. This article will review goals set from the initial baseline results, and how we resolved bottlenecks we encountered during the testing phase. Now that we have a good report of the current state of the platform, it’s time to beat that baseline.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/846/1*tddR6W5jcTlRVEZSEEtHhA.png" /></figure><h3>Beating the baseline</h3><p>Let’s do a quick review of the <a href="https://achievers.engineering/load-testing-kubernetes-building-a-framework-part-1-bdc0af4ae7e2">first article</a> on the metrics we monitored and reported on.</p><ul><li><strong>Throughput:</strong> Refers to the number of requests that a system can handle per second.</li><li><strong>Errors:</strong> Number of failed requests that occurred during the test period.</li><li><strong>Latency:</strong> The time taken for a request to be processed from the time it was sent out.</li><li><strong>Scalability:</strong> The platform&#39;s ability to handle increasing loads without significant performance degradation.</li></ul><p>Having highlighted the metrics above, we then set a goal for each. This was done to effectively measure if we can successfully improve our system.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/970/1*98bGpd4EzY10JJPDrLSCSQ.png" /><figcaption>Outcome goals to measure load testing success</figcaption></figure><p>To measure testing results and track expectations, we created observability dashboards built in <a href="https://newrelic.com/">New Relic</a>. Dashboards prepared the team to quickly identify bottlenecks and issues that arise during the testing period.</p><p>After reviewing the dashboards it was apparent bottlenecks were limiting our platform performance.</p><h3>Throughput optimization</h3><h4><strong>Istio Load balancing</strong></h4><p>gRPC keeps TCP sessions open as long as possible to maximize throughput and minimize overhead, but the long-lived sessions make load balancing complex. This is particularly an issue in auto-scaled Kubernetes environments. When load increases new pods are added, however, the client will stay connected to the old gRPC pods, resulting in unequal load distribution.</p><p>Below is a great example of gRPC traffic travelling to a deployment and not balancing.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/994/1*PKB7rRK0h2qy39dhazTteA.png" /><figcaption>New Relic dashboard showing unequal balancing of requests per second (RPS)</figcaption></figure><p>You can see we are getting sporadic requests to each pod, including one pod getting no traffic at all. <a href="https://istio.io/">Istio</a> helps us distribute requests by sharing connection information between Envoy proxies. The <a href="http://envoyproxy.io/">Envoy</a> proxies share the number of requests being received, Istio can determine which pod is less busy and can better serve the request.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*QgDuou1H-b6vv0MVnelXew.png" /></figure><p>Configuring load balancing on your <a href="https://www.envoyproxy.io/docs/envoy/v1.5.0/intro/arch_overview/load_balancing">destinationRule to use <em>LEAST_REQUEST</em></a> instead of the default of round-robin, helped solve the issue of unbalanced traffic.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/912/1*jGnG68GJBZ3btykiDvu9wA.png" /><figcaption>DestinationRule with <em>LEAST_REQUEST</em> set</figcaption></figure><p>After the new loadBalancer configuration was deployed, the results show an even distribution of requests among pods and a large bump in throughput across all services.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*h6o8hSiQJJejm3wbeX0E-w.png" /><figcaption>Results of an evenly balanced distribution of requests per pod</figcaption></figure><h3>Errors</h3><h4><strong>Client-side</strong></h4><p>Not all bottlenecks are on the server. We noticed a few bottlenecks on the load testing client generating the load resulting in a high error rate. While we had enough CPU/memory to run our tests, our network had some limitations which revealed themselves.</p><p>Google Cloud virtual machines without an external IP address have traffic travelling outbounds through a <a href="https://cloud.google.com/nat/docs/overview">Cloud NAT</a>. When running a load test from inside another GCP project, egress traffic spiked <em>OUT_OF_RESOURCES</em> errors during the testing period.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kyPUACg4Q5k18RN1D4witg.png" /><figcaption>High error rate on outbound connections during testing</figcaption></figure><p>The team added extra IP addresses and bumped the “<em>ports allowed to a destination address</em>” to the Google Cloud NAT. You can see from the image below we hit a flat line limit before solving the issue at the end of the graph.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*8rXvIgtsyYdxNCCrc4wtFg.png" /><figcaption>Flat lines show resource exhaustion — The end of the image shows the issue resolved</figcaption></figure><p>A long-term solution would be to fully move to IPV6 to remove outbound connection limits. Achievers plans to be on IPV6 for all our networking in 2024.</p><h3>Latency</h3><h4><strong>Istio config</strong></h4><p>Since all cluster traffic travels through the Istio Envoy proxy, we thought there would be room to improve latency. During the investigation we did not see any long transactions hanging in Envoy, however, we thought this would be a good time to see if we could improve Istio by tweaking some configuration. <a href="https://istio.io/latest/docs/reference/config/networking/proxy-config/#ProxyConfig">Istio Concurrency</a> is the number of worker threads which run on the Envoy proxy sidecar. If unset, the default is 2. If set to 0, this will be configured to use all cores on the machine using CPU requests and limits to choose a value, with limits taking precedence over requests.</p><p><strong><em>Concurrency Results:</em></strong></p><blockquote>4 workers =&gt; 4434.11/s + p(95)=114.67ms</blockquote><blockquote>6 workers =&gt; 4230.42/s + p(95)=98.3ms</blockquote><blockquote>2 workers =&gt; 4519.10/s + p(95)=100.75ms</blockquote><p>In our case, Istio concurrency didn’t seem to impact performance at all. It was worth the exercise to see if it would benefit us, although in the end there were no significant gains.</p><h4><strong>Code improvements</strong></h4><p>Often shared code can introduce issues across services. One example of this is when a bug in our database connector caused quite a bit of extra latency in outbound connections.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*imQQVjoKySFNwSx_LUGkcQ.png" /><figcaption>Extra database calls caused unnecessary latency — Red shows a breach in SLO (measured in milliseconds)</figcaption></figure><p>Using New Relic tracing we were able to easily spot a pattern. In the image above you can see latency results were high on endpoints which had these slow database calls. Database locks were used to switch to the schema needed before executing the query. This costs additional time to maintain those locks. The issue was resolved by removing a call to switch schemas and instead appending the schema name to the query.</p><p>After the library was optimized, the service saw an overall improvement in the average response time.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Pcf3vYtkrqLqrV5sRUQAZw.png" /><figcaption>After database calls were enhanced, the average response time dropped significantly(measured in milliseconds)</figcaption></figure><p>Another code issue was revealed on an old endpoint that lived in our monolith. The endpoint was seeing very poor performance, often causing requests to take longer than 10 seconds to complete.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*vRs7AHETE6ZhJxhsNY0kBA.jpeg" /><figcaption>One slow endpoint was taking 10 seconds to complete</figcaption></figure><p>After we upgraded the endpoint and optimized database queries, we managed to get that back down to milliseconds.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*x0--FyFkt9B7mlFduLdNzw.jpeg" /><figcaption>After enhancements to the code to reduce latency</figcaption></figure><h4><strong>Caching</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*sq1QNoHPTdjBN9MlAxCzPg.png" /><figcaption>Kubernetes pod out-of-memory</figcaption></figure><p>Large caching improvements came by moving some images to the CDN to improve response times. A few bottlenecks were located on services which rely heavily on Redis cache. While Redis should not be a dependency for services, it does <em>greatly</em> improve performance for applications.</p><p>Reviewing resource graphs on New Relic revealed Redis was being exhausted of resources in a couple of critical namespaces. The two purple lines exceed the Kubernetes limit, pointing to memory exhaustion and out-of-memory (OOM) errors.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*vPpctUWTS2eKZzHnhBTu1A.png" /><figcaption>New Relic Dashboard showing high Memory usage on Redis masters during load testing</figcaption></figure><p>A quick PR to bump Redis Kubernetes requests quickly solved memory exhaustion. Overall, this was a great exercise to test how much of a hit on performance heavily cached services had when Redis resources became saturated.</p><h3>Scaling</h3><p>Nodes are the managed virtual machines a Kubernetes cluster will run workloads on. Even though the virtual machines may be ephemeral and come and go, you need to guarantee your cluster is performing well and scaling accordingly. Once you go through basic improvements such as tweaking node CPU, memory, and disk, you should review some of the other modifications made below which ensure your infrastructure is scaling effectively.</p><h4><strong>IP Address limitations:</strong></h4><p>Clusters are created with IP ranges, and often values are never revisited. At the beginning of the testing, we quickly noticed our cluster could soon hit a limit with the number of worker nodes in the cluster. Kubernetes will take the pod network and divide it across the worker node network, restricting the number of workers in your<a href="https://cloud.google.com/kubernetes-engine/docs/concepts/node-pools"> nodepools</a>. Depending on the<a href="https://cloud.google.com/kubernetes-engine/docs/how-to/flexible-pod-cidr"> max_pods_per_node</a> value, node creation is bound by the number of addresses in the Pod address range.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*97FgVTHuUpOv70qD86C7Vg.png" /><figcaption>Example: Scaling flatlined during a load test on a Kubernetes cluster</figcaption></figure><p>For example, if you set the default maximum number of Pods to 110 and the secondary IP address range for Pods to /21, Kubernetes assigns a /24 CIDR range to nodes on the cluster. This allows a maximum of 2(24-21) = 23 = 8 nodes on the cluster.</p><p>The limit of IP addresses may result in your cluster’s nodes being unable to scale and workloads being throttled, or worse, crashing due to resource exhaustion. This was an easy fix for us as we just needed to adjust some of the IP ranges assigned to pods and workers. Google has also introduced “<a href="https://cloud.google.com/kubernetes-engine/docs/concepts/alias-ips#cluster_sizing_secondary_range_pods">secondary IP ranges</a>” which can assist teams who need to rebuild their clusters to address this issue.</p><h4><strong>TopologySpreadConstraints:</strong></h4><p>High-utilized Kubernetes Deployment may need to be distributed amongst different worker nodes to ensure resources are not exhausted. Using<a href="https://kubernetes.io/docs/concepts/scheduling-eviction/topology-spread-constraints/"> topologySpreadConstraints</a> allows Pods to spread across the clusters’ failure domains such as regions, zones, hosts, and other user-defined topologies.</p><p>We often use this feature on our critical services to ensure our Kubernetes clusters scale effectively. When <em>Unsatisfiable</em> is set to <em>DoNotSchedule</em> it can force the cluster to scale if more than two pods live on all workers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HSRkS837AvAdc4CVrYHIYg.png" /></figure><p>If we allow the cluster to scale with critical services, we ensure we have enough CPU and memory during a spike in traffic. Tweaking this value along with average scaling values, allowed for the cluster to scale <em>10x</em> more effectively.</p><h3>Conclusion</h3><p>After we resolved all the larger bottlenecks, it was time to review our initial goals. The results were in!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/862/1*VUEj-L4iiL_9HaoHK7cs5Q.png" /></figure><p>The team was able to meet our goals in every case, often surpassing expectations. It was relieving to see we did not impact any of our defined SLOs for errors or latency by the end of our initial testing. By improving throughput by <em>4x</em> we were able to confidently handle failover traffic in a single region during an outage. Overall the cluster scaling had also improved by introducing properly sized resources, along with Istio handling gRPC request load balancing.</p><p>While we will always have room for improvement, the Achievers platform now has a flexible framework to continuously load test and measure performance.</p><p>Please leave a comment below with any questions you may have or your personal experience with load testing distributed platforms.</p><p>We would love to hear from you!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c4f08102f105" width="1" height="1" alt=""><hr><p><a href="https://achievers.engineering/load-testing-kubernetes-resolving-bottlenecks-and-improving-performance-part-2-c4f08102f105">Load testing Kubernetes: Resolving bottlenecks and improving performance (Part 2)</a> was originally published in <a href="https://achievers.engineering/">Achievers Engineering</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Load Testing Kubernetes: Building a Framework (Part 1)]]></title>
            <link>https://achievers.engineering/load-testing-kubernetes-building-a-framework-part-1-bdc0af4ae7e2?source=rss-aae990837eda------2</link>
            <guid isPermaLink="false">https://medium.com/p/bdc0af4ae7e2</guid>
            <category><![CDATA[load-testing]]></category>
            <category><![CDATA[performance-testing]]></category>
            <category><![CDATA[sre]]></category>
            <category><![CDATA[distributed-systems]]></category>
            <category><![CDATA[kubernetes]]></category>
            <dc:creator><![CDATA[Stefan Kolesnikowicz]]></dc:creator>
            <pubDate>Wed, 07 Jun 2023 13:37:42 GMT</pubDate>
            <atom:updated>2023-11-22T17:58:54.391Z</atom:updated>
            <content:encoded><![CDATA[<p>Slow response times, resource exhaustion, downtime and waiting on workloads lead to dissatisfied users. Load Testing proves the platform remains stable under heavy workloads and can recover quickly from failures.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*o-SKGT2SANaaTl1LohbhWQ.jpeg" /></figure><p>Our <a href="https://www.achievers.com/">Achievers</a> <a href="https://achievers.engineering/scaling-production-globally-service-mesh-face-lift-part-1-30ad6d393d04">multi-cluster</a> <a href="https://achievers.engineering/scaling-production-globally-solving-observability-problems-for-developers-part-2-b5416ce5eb8a">kubernetes platform</a> needs to be flexible to handle predicted and unexpected traffic. The SRE team designed a framework to help our engineers easily stress the system and monitor results. Part one of this series will run through what the Achievers team did to prepare our load-testing-framework and how we ensured we met our objectives. The next article will review how we unblocked bottlenecks and improved overall performance.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*i0MP9wixO-SmQ6p4" /></figure><p>Before jumping into tools and processes, the team needed to come up with a list of requirements around success and failures. It was critical users reviewing the results clearly understood if performance improved or decreased and which data points to look at. The outcome of each test can be measured based on the following criteria:</p><ul><li><strong>Throughput:</strong> Refers to the number of requests that a system can handle per second.</li><li><strong>Errors:</strong> Number of failed requests that occurred during the test period.</li><li><strong>Latency:</strong> The time taken for a request to be processed from the time it was sent out.</li><li><strong>Scalability:</strong> The Platform’s ability to handle increasing loads without significant performance degradation.</li></ul><h3><strong>Building out a Load-Testing framework in 4 steps:</strong></h3><p>To build the right framework we explored the following 4 steps to reach our goal:</p><p><strong>1.</strong> <strong>Picking the right tool</strong></p><p>Our monolith had been using <a href="https://jmeter.apache.org/">Jmeter</a> for years, however we wanted to take advantage of recent tools for our new framework. Automating a solution anyone could contribute to would be a challenge using Jmeter due to it being overly complicated to write tests and report results the way we wanted.</p><p>After reviewing some of the new players we decided on K6. <a href="https://k6.io/">K6</a> was a new kid on the block and would be easy for anyone to write tests in Javascript. It also had support for GRPC which allowed for us to test services directly not just through the gateway</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*63T1PnWpqA71WHFI.png" /></figure><p><strong>2.</strong> <strong>Defining scope</strong></p><p>The goal was to replicate a user experience on our platform using K6 with a focus on backend performance. The SRE team came up with a scope for the testing framework.</p><ul><li><strong>Focus on backend </strong>components and performance.</li><li><strong>Omit third party APIs</strong> from your testing. This can be a bottleneck outside your scope of test, and could cause issues for those external services.</li><li><strong>Mind cost.</strong> CDN, extra logging, and cloud costs like compute/egress etc are all more expensive when stressing the platform.</li><li><strong>Don’t test CDN</strong>. As per the documentation <a href="https://k6.io/docs/testing-guides/load-testing-websites/#consider-factors-that-affect-script-realism">on the k6 website</a>, it may be better to test without cached resources.</li><li><strong>Don’t test media assets</strong>. End-to-end tests cover this case. Cost can also be a factor if you include large images or videos in load-testing.</li></ul><p>During the period of testing we could hit the framework on demand, but the goal was to run this as part of our CICD pipelines. Leveraging <a href="https://achievers.engineering/enter-the-abattoir-ee5e2019f0b3">existing tooling</a>, we could drop the K6 framework into pipelines and run load or stress tests.</p><p>Our main target for running load tests would be our pre-production environment. We agreed to run our tests from a Kubernetes cluster outside the network of our application clusters to simulate external users calling the platform. The testing cluster would have dedicated <a href="https://cloud.google.com/kubernetes-engine/docs/concepts/node-pools#:~:text=A%20node%20pool%20is%20a,pool&#39;s%20name%20as%20its%20value.">nodepools</a> to run the load to avoid saturation from other workloads. By using Kubernetes, we also have the ability to <a href="https://github.com/grafana/k6-operator">distribute virtual users</a> across multiple workers.</p><p>3. <strong>Building a Baseline</strong></p><p>A baseline is a starting point for performance values to show improvement or degradation over time. Baseline results are a good place to get an idea on what you can handle today and the goals you wish to achieve. Our initial trial-and-error tests helped us come up with a set of questions to use for discussions when defining our baseline goals.</p><ul><li>How many virtual users can we handle today/What do we want to achieve?</li><li>Are there any known bottlenecks or limitations to document?</li><li>What can be achieve today with the defined success criteria/What do we want to achieve? (Throughput/Latency/Errors/Scaling)</li><li>What are the threshold values?</li></ul><blockquote><strong><em>**Note: Results and how we reached our goals will be covered in part 2**</em></strong></blockquote><p><strong>4.</strong> <strong>Defining</strong> <strong>Thresholds</strong></p><p>The thresholds set are based on our initial criteria of throughput, errors, and latency. Thresholds are interesting because they show a direct correlation to individual service SLO (service level objectives). Since we already have defined availability and latency SLOs, this gave us a great starting point for setting performance thresholds. For example, if an endpoint is below a <em>99.00%</em> availability SLO, the error rate during the testing period should not exceed 1%. If the error threshold is exceeded, the framework should fail that test.</p><p>Along with thresholds we set goals. For each of our success criteria we wanted to set a specific goal and make sure we were within the allowable threshold. Goals will help us show improvement when bottlenecks are addressed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9bPSbllEB_djSm_aTHmtJw.png" /></figure><h3><strong>Conclusion</strong></h3><p>Load testing your platform is essential to ensuring you can handle unexpected workloads and run efficiently. Designing a reusable framework and creating a test plan with measurable performance metrics are best practices that can help you achieve success in performance testing Kubernetes. By following these best practices, you can ensure that your Kubernetes cluster performs optimally and meets the needs of your users.</p><p><a href="https://achievers.engineering/load-testing-kubernetes-resolving-bottlenecks-and-improving-performance-part-2-c4f08102f105">In part two of the load-testing series</a>, I will talk about how to analyze the results of your test and optimize cluster configurations. I will cover how Achievers improved performance by tracking and unblocking bottlenecks in Kubernetes workloads, Istio, Google Cloud Platform and more.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bdc0af4ae7e2" width="1" height="1" alt=""><hr><p><a href="https://achievers.engineering/load-testing-kubernetes-building-a-framework-part-1-bdc0af4ae7e2">Load Testing Kubernetes: Building a Framework (Part 1)</a> was originally published in <a href="https://achievers.engineering/">Achievers Engineering</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Achievers improves uptime and ship velocity with service level management — [external case study]]]></title>
            <link>https://achievers.engineering/achievers-improves-uptime-and-ship-velocity-with-service-level-management-external-case-study-ef722a344446?source=rss-aae990837eda------2</link>
            <guid isPermaLink="false">https://medium.com/p/ef722a344446</guid>
            <category><![CDATA[developer]]></category>
            <category><![CDATA[observability]]></category>
            <category><![CDATA[new-relic]]></category>
            <category><![CDATA[service-level-objectives]]></category>
            <category><![CDATA[site-reliability-engineer]]></category>
            <dc:creator><![CDATA[Stefan Kolesnikowicz]]></dc:creator>
            <pubDate>Tue, 16 Aug 2022 12:01:02 GMT</pubDate>
            <atom:updated>2022-08-16T12:01:02.966Z</atom:updated>
            <content:encoded><![CDATA[<h3>Achievers improves uptime and ship velocity with service level management — [external case study]</h3><h4>New Relic Case study on Achievers use of service level objectives</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*DVJrgHMdNxCUDi_-" /></figure><p>Site Reliability Engineers (SREs) and developers at <a href="https://achievers.com/">Achievers</a> have the complicated task of running a <a href="https://achievers.engineering/scaling-production-globally-service-mesh-face-lift-part-1-30ad6d393d04">multi-region Kubernetes service mesh</a>. While running in a single region alone would cover significant amounts of data, the engineers needed to scale the platform globally and make sense of all of this distributed data. It was difficult to understand what data was needed and <a href="https://achievers.engineering/scaling-production-globally-solving-observability-problems-for-developers-part-2-b5416ce5eb8a">how to use this data to solve their problems</a>.</p><p>Check out the full case study below:</p><p><a href="https://newrelic.com/customers/achievers">Achievers</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ef722a344446" width="1" height="1" alt=""><hr><p><a href="https://achievers.engineering/achievers-improves-uptime-and-ship-velocity-with-service-level-management-external-case-study-ef722a344446">Achievers improves uptime and ship velocity with service level management — [external case study]</a> was originally published in <a href="https://achievers.engineering/">Achievers Engineering</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Scaling Production Globally: Solving observability problems for developers (Part-2)]]></title>
            <link>https://achievers.engineering/scaling-production-globally-solving-observability-problems-for-developers-part-2-b5416ce5eb8a?source=rss-aae990837eda------2</link>
            <guid isPermaLink="false">https://medium.com/p/b5416ce5eb8a</guid>
            <category><![CDATA[development]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[istio]]></category>
            <category><![CDATA[new-relic]]></category>
            <category><![CDATA[observability]]></category>
            <dc:creator><![CDATA[Stefan Kolesnikowicz]]></dc:creator>
            <pubDate>Wed, 08 Jun 2022 14:10:53 GMT</pubDate>
            <atom:updated>2022-06-09T12:25:54.031Z</atom:updated>
            <content:encoded><![CDATA[<p><a href="https://achievers.engineering/scaling-production-globally-service-mesh-face-lift-part-1-30ad6d393d04">Running a multi-region Kubernetes service mesh</a> brings extra complexity for SRE and developers. Running in a single region has a lot of data alone, but what if you need to scale your platform globally? How do you make sense of all this distributed data? Is it all needed? Most importantly, how do you use the data to solve problems for engineers? At <a href="https://achievers.com/">Achievers</a> we use <a href="https://newrelic.com/">New Relic</a> as our single pane of glass, to get a bird’s eye view of our global distributed platform.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OINWYKkDZGCKP7ypVFziYw.png" /><figcaption>Solving problems for Engineering with Istio and New Relic</figcaption></figure><p>In this article, I will walk through which <a href="https://istio.io/">Istio</a> data to use, and what we can do with all these metrics.</p><h3>Metrics</h3><h4>So much data, where do I get started?</h4><p>I often get frustrated when reviewing new metrics for the first time. <br>So many numbers, and often I have a strong internal debate on how to represent data. If you are running Istio, you most likely have <a href="https://docs.newrelic.com/docs/infrastructure/prometheus-integrations/install-configure-openmetrics/install-update-or-uninstall-your-prometheus-openmetrics-integration/">Prometheus metrics</a> turned on, but may not know <em>where to begin</em>. Here is a list of some of the key metrics our team used to get us started with alerting and monitoring Istio:</p><ul><li>The <a href="https://prometheus.io/docs/concepts/metric_types/"><strong>counter metric</strong></a><strong> — </strong><strong>istio_requests_total </strong><br> Measures the total number of requests handled by an Istio proxy.</li><li>The <a href="https://prometheus.io/docs/practices/histograms/"><strong>distribution metric</strong></a><strong> — </strong><strong>istio_request_duration_milliseconds </strong><br> Measures the time it takes for the Istio proxy to process requests.</li><li>The <a href="https://prometheus.io/docs/practices/histograms/"><strong>distribution metric</strong></a><strong> — </strong><strong>istio_request_bytes /</strong> i<strong>stio_response_bytes </strong><br> Measures request and response body sizes.</li></ul><p>We use these mostly for troubleshooting and understanding how our platform is operating. You can track where requests are going and coming from, if they are successful or slow, traffic volume, and if requests cross clusters.</p><p>The addition of <a href="https://istio.io/latest/docs/reference/config/metrics">filters</a> can help you further narrow down results. Cross-cluster monitoring means you need to stay on top of upstream and downstream services, along with the added complexity of source and destination clusters. Here are a few of the common filters which help us monitor traffic across our service mesh:</p><ul><li>reporter</li><li>source_workload / destination_workload</li><li>source_cluster / destination_cluster</li><li>clusterName</li></ul><p>If your team is planning on monitoring the <a href="https://sre.google/sre-book/monitoring-distributed-systems/">4 Golden Signals</a> like us, I recommend starting with tracking availability and latency within your mesh.</p><h4>Availability</h4><p>Availability is a great place to begin because it shows the fraction of the time that a service responds successfully. Using <em>istio_requests_total </em>you can get a lot of useful information, importantly error rate or traffic throughput. This example NRQL query can be used to determine the success rate of a simple HTTP service:</p><blockquote><em>FROM Metric<br>SELECT percentage(sum(istio_requests_total), <br>WHERE response_code in (&#39;200&#39;) as &#39;Success rate (%)&#39;)<br>WHERE reporter = &#39;destination&#39;<br>AND namespaceName = &#39;appName&#39;<br>AND istio_requests_total !=0</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*p8uZCe9fE81WbqU-iKYRnw.png" /><figcaption>Success Rate of a service</figcaption></figure><h4>Latency</h4><p>Using <em>istio_request_duration_milliseconds_sum, </em>we can trace how long it takes a service to return a response from a request. Latency can be useful when troubleshooting overall performance problems upstream, downstream or between services. In this example, the key is to filter based on your service name and clusterName to understand if one cluster is experiencing more latency than others.</p><blockquote><em>FROM Metric <br>SELECT (rate(sum(istio_request_duration_milliseconds_sum), 1 minute) / rate(sum(istio_request_duration_milliseconds_count), 1 minute)) AS &#39;Milliseconds&#39; <br>WHERE reporter = &#39;destination&#39;<br>AND namespaceName = &#39;appName&#39;<br>FACET </em><strong><em>clusterName</em></strong><em> <br>TIMESERIES</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ILHDZC1Pyb-kfe5L" /><figcaption>Service latency by clusterName</figcaption></figure><h4>Cross-Region</h4><p><a href="https://istio.io/latest/docs/tasks/traffic-management/locality-load-balancing/failover/">Istio locality</a> allows for failover to another region if there is a service failure, or extra resources are required to process requests. Having a single pane of glass can easily spot issues across clusters by filtering on `<em>destination_cluster</em>` and `<em>source_cluster</em>`. Having metrics from all your clusters in a central location will help improve global visualization and resolve problems quicker.</p><figure><img alt="Cross regional traffic" src="https://cdn-images-1.medium.com/max/1024/1*Zo_X77mvi5b-VbQqbVyHew.png" /><figcaption>Example of cross cluster traffic</figcaption></figure><h4>Are all Istio Metrics needed?</h4><p>Achievers uses a mix of a local Istio Prometheus instance and <a href="https://docs.newrelic.com/docs/infrastructure/prometheus-integrations/get-started/send-prometheus-metric-data-new-relic/">sends select metrics to New Relic</a>. <em>Don’t</em> <em>completely turn off unused metrics</em>. This data may be useful for local troubleshooting, but may not be needed centrally in your observability provider. Istio can generate a lot of data and you should omit unused metrics from leaving the cluster to save on cost. I recommend you review the metrics you are using and <em>reduce the sample rate</em> in non-production environments to cut down on high ingest.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0VXiZU9J4d7MQhTlV1J8Bg.png" /><figcaption>Example: We turned off a lot of unused Metrics</figcaption></figure><p>Just because our developers use New Relic for everyday monitoring, doesn’t mean we can’t use out-of-the-box Istio observability tools as well.</p><h3>What can we do with the data we send?</h3><p>Once you have your data and some example queries, you can start <em>solving problems for your developers</em>. The SRE team began compiling a list of topics we wanted to solve for our engineers:</p><ul><li>Everyday Observability (Monitoring/Alerting and Dashboards)</li><li>Service Level Management (SLO/SLI Tracking)</li><li>Deployment Confidence (Canary with analysis)</li></ul><h4>Everyday observability</h4><p>Today engineers at Achievers are using New Relic constantly. When we first started deploying microservices, teams didn&#39;t know where to begin with observability.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rx2tY7-44B5b3usEhSBPgw.png" /><figcaption>Default dashboards can help cut down on scrambling to find the issue in the middle of the night</figcaption></figure><p>The SRE team gives developers a per-service auto-generated dashboard as part of our self-service tool (<a href="https://achievers.engineering/enter-the-abattoir-ee5e2019f0b3">Abattoir</a>). This includes standard metrics to monitor for high error rates, error logs, and pod failures, but also a dedicated Istio page. Following the <a href="https://sre.google/sre-book/monitoring-distributed-systems/"><em>4 Golden Signals</em></a> may be a good starting point for you and your team to create some default alerts or dashboards.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*k8ixo5-FoV2Jrx7GckdBGw.png" /></figure><p>As a developer, I want to move fast. Automate everything. Seeing that our feature teams were ramping up, the SRE team wanted to make observability as easy as we could for developers by automating everything. Most services could be set with a standard set of default alerts based on the golden signals. Often you can guess what your workloads may look like in production. Realistically you may not know until you are actually running in production. <a href="https://achievers.engineering/enter-the-abattoir-ee5e2019f0b3">Using this method of sensible defaults</a>, engineers can move into production quickly with a standard set of monitoring and alerting. A developer has the option to disable the defaults or write a custom policy.</p><p><a href="https://achievers.engineering/scaling-production-globally-service-mesh-face-lift-part-1-30ad6d393d04">In the first part of this series, I talk about how we struggled with nodejs applications failing to gracefully shut down after receiving a SIGTERM from Kubernetes</a>. When the team first noticed this issue, the default dashboards lead engineers to the problem. Using Istio logs and metrics we were able to correlate patterns which pointed us to <em>503 UC upstream_reset_before_response_started</em> errors. One of the reasons we encourage using metrics from Istio for monitoring is that it&#39;s a more comparable experience to real users. <em>Istio is on the network layer, and APM is application only</em>. APM is great, but it could miss issues caused on the network such as a <a href="https://hackernoon.com/graceful-shutdown-in-nodejs-2f8f59d1c357">Kubernetes SIGTERM not making its way down to a child process</a> prematurely killing connections.</p><blockquote>SELECT reporter, response_code, response_flags <br>FROM Metric <br>WHERE response_code like &#39;5%&#39; <br>AND namespaceName = &#39;appName</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/704/1*b8JS0osokb7GeYrBuhRQAA.png" /><figcaption>Istio 503 tracing</figcaption></figure><p>No one wants to be scrambling in the middle of the night to solve a production issue. Default dashboards lead to quicker resolution times and can get new features into production faster. Engineers can get a deeper understanding of their microservice and can better visualize patterns centrally.</p><h4>Service Level Management</h4><p>At Achievers, the SRE teams had always been solely on call for the reliability of the platform. Now that engineers own their services in production, they also have a hand in maintaining the steady state for the applications they write. We needed a tool to consolidate our data, and visually represent goals we can track over time.</p><blockquote>“Everyone owns reliability, <strong>not solely the SRE Team.</strong>”</blockquote><blockquote>— Stefan Kolesnikowicz, Principal Site Reliability Engineer</blockquote><p>New Relic already has all of this data, so it only made sense for us to use the <a href="https://docs.newrelic.com/docs/service-level-management/intro-slm/">Service Level Management</a> feature. Setting a Service Level Objective(SLO) in New Relic allows for tracking success and failures using Service Level Indicator(SLI) and error budgets. I suggest starting services with an <strong>availability</strong> objective first, as it is probably the most impactful metric to clients. If users are not able to successfully visit the service in question, this will severely impact their experience.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wMyuLg4-Yuxx9tPJgUNeAA.png" /></figure><p>Latency is another great SLO to capture.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WJZ7zm-H-LhX5Cyx6NoIaw.png" /><figcaption>SLO types (availability + latency)</figcaption></figure><p>Often product owners don’t understand why specific maintenance items needed to be prioritized in sprints. Service Level Management gives the ability to visualize the impact of bugs while tracking the reliability of a microservice over time. Product owners have a stake in setting a services SLO. They must agree to slow down or halt feature development if their service level objectives are not being met. Having a dashboard to visualize the indicators and trends can be helpful to get everyone on the same page about reliability.</p><p>The adoption of SLOs has been a great next chapter for Achievers engineering. Developers now work in sync with product owners to plan better based on service level objectives.</p><h4>Deployment Confidence</h4><p>Ten years ago I thought “Testing in production” would end in disaster. Now, I highly encourage it. No matter how hard you try, you will never be able to fully mock production traffic. How do we ensure new code doesn’t introduce risk into the platform?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UBcYpaeIMOYFa_SbfWa2dg.png" /><figcaption>Canary deployment example</figcaption></figure><p>Canary deployments allow for <em>releasing new code to a subset of users or servers,</em><strong><em> </em></strong><em>often directly in production</em><strong>. </strong>Automatic rollbacks are triggered if your canary begins to see problems.<strong> </strong>Considering the metric data for Istio was already being ingested, we wanted ArgoCD and New Relic to drive our progressive delivery.</p><p>Using the <a href="https://argoproj.github.io/argo-rollouts/analysis/newrelic/">ArgoCD New Relic Rollout integration</a>, we can query New Relic to determine if an application&#39;s deployment has introduced errors. Our developers can select from a library of predefined ArgoCD <em>ClusterAnalysisTemplate</em> files, or create a custom template to do their canary analysis.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SMsjKurttb0qUTc_UQ-BVg.png" /><figcaption>ArgoCD ClusterAnalysisTemplate using Istio Metrics</figcaption></figure><p>You can take this one step further and leverage <a href="https://istio.io/latest/docs/concepts/traffic-management/">Istio’s traffic shaping</a> for network-based canaries to get more granular. Canary deployments are just one tool in our toolbox to increase our confidence in code.</p><h3>Conclusion</h3><p>Overall observability in a distributed platform can be difficult, especially when looking at new metrics for the first time. With the help of the 4 Golden signals and automation, our developers can quickly go into production feeling good they have default monitoring and alerting out-of-the-box. Reliability is owned by everyone today. SRE, product owners and developers need to be aligned on SLOs goals. New Relic has been great for Achievers to easily aggregate data and visualize it centrally for all stakeholders.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ggt7X2sIB6yVSojZeXeZRA.png" /></figure><p>Whether it&#39;s in the form of tracking SLOs, canary deployments analysis, or everyday observability, Istio and New Relic have helped us solve many problems for the Achievers engineering teams. The complexity of a multi-cluster service mesh means centralized observability data is even more critical to the success of a distributed platform.</p><p>Please comment below with any questions you may have, or what your experience with multi-cluster Istio observability has been like. <br>We would love to hear from you.</p><p><strong>Future stack 2022 presentation video coming soon.</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b5416ce5eb8a" width="1" height="1" alt=""><hr><p><a href="https://achievers.engineering/scaling-production-globally-solving-observability-problems-for-developers-part-2-b5416ce5eb8a">Scaling Production Globally: Solving observability problems for developers (Part-2)</a> was originally published in <a href="https://achievers.engineering/">Achievers Engineering</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[I am presenting at New Relic Futurestack 2022]]></title>
            <link>https://stekole.medium.com/i-am-presenting-at-new-relics-futurestack-2f191994c026?source=rss-aae990837eda------2</link>
            <guid isPermaLink="false">https://medium.com/p/2f191994c026</guid>
            <category><![CDATA[new-relic]]></category>
            <category><![CDATA[istio]]></category>
            <category><![CDATA[engineering]]></category>
            <category><![CDATA[conference]]></category>
            <category><![CDATA[observability]]></category>
            <dc:creator><![CDATA[Stefan Kolesnikowicz]]></dc:creator>
            <pubDate>Mon, 02 May 2022 18:13:10 GMT</pubDate>
            <atom:updated>2022-05-03T16:20:41.564Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*r4-iKC8ngNF9k1HBg-MhJw.png" /></figure><h3>Solving observability needs for engineers with Istio and New Relic</h3><p>A service mesh brings a lot of great data, but which data is useful and how can you take advantage of it? The Achievers team demonstrates how they used Istio and New Relic to provide creative ways to solve the observability needs of their engineers.</p><p><a href="https://www.futurestack.com/">Join Stephen Griffin and I on May 17-19th in Las Vegas for Futurestack 2022.<br> </a><br>Oh.. and Steve Wozniak is the keynote speaker. Rad!</p><p>Let me know if you are attending in the comments</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2f191994c026" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[I am presenting at PlatformCon 2022]]></title>
            <link>https://stekole.medium.com/i-am-presenting-at-platformcon-2022-6880c527fd91?source=rss-aae990837eda------2</link>
            <guid isPermaLink="false">https://medium.com/p/6880c527fd91</guid>
            <category><![CDATA[platform-engineering]]></category>
            <category><![CDATA[conference]]></category>
            <category><![CDATA[sre]]></category>
            <category><![CDATA[developer-experience]]></category>
            <category><![CDATA[documentation]]></category>
            <dc:creator><![CDATA[Stefan Kolesnikowicz]]></dc:creator>
            <pubDate>Mon, 25 Apr 2022 12:46:05 GMT</pubDate>
            <atom:updated>2022-04-25T12:46:05.043Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OwnN5SGeShKsFIUWJsAOZQ.png" /></figure><h3>Running through the 6 with documentation woes — improving the developer experience</h3><p>Do you wonder if your engineers enjoy the internal tooling they use every day? Do you struggle with keeping developer technical documentation appealing and relevant? Achievers are in the business of employee success and the developer experience is <em>very important</em> to them. With over 10 years of out-of-date documentation piling up, and engineers constantly getting lost, the Developer Experience team knew they had to do something. In this talk, <a href="/service/mailto:stefan@sandnetworks.com">Stefan Kolesnikowicz</a> will discuss how a small group improved Achievers engineering culture through automation and tooling.</p><p>His talk will cover how to:</p><ul><li>Improve documentation quality by introducing automation tooling</li><li>Gain meaningful feedback from users of internal tooling</li><li>Improve the overall developer experience by applying documentation best practises</li></ul><p><a href="https://platformcon.com/talk/running-through-the-6-with-documentation-woes-improving-the-developer-experience">https://platformcon.com/talk/running-through-the-6-with-documentation-woes-improving-the-developer-experience</a></p><p>Register for <a href="https://platformcon.com/register">PlatformCon</a>, it&#39;s free!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6880c527fd91" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Scaling Production Globally — Service mesh face-lift (Part-1)]]></title>
            <link>https://achievers.engineering/scaling-production-globally-service-mesh-face-lift-part-1-30ad6d393d04?source=rss-aae990837eda------2</link>
            <guid isPermaLink="false">https://medium.com/p/30ad6d393d04</guid>
            <category><![CDATA[site-reliability-engineer]]></category>
            <category><![CDATA[troubleshooting]]></category>
            <category><![CDATA[service-mesh]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[istio]]></category>
            <dc:creator><![CDATA[Stefan Kolesnikowicz]]></dc:creator>
            <pubDate>Wed, 13 Apr 2022 12:24:15 GMT</pubDate>
            <atom:updated>2022-04-13T12:32:28.702Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>Scaling Production Globally — The service mesh facelift (Part-1)</strong></h3><figure><img alt="Achievers scaling globally using Istio" src="https://cdn-images-1.medium.com/max/1024/1*EAsrh_eXE8Tsnn5Ki9O1qw.png" /></figure><p><a href="https://achievers.com/">Achievers</a> has been growing rapidly over the past two years, and we have been working hard to grow our microservices and scale our platform globally.</p><p>We have been running Istio in production for well over 18 months and we suffered and learned a lot during this process. I thought it would be interesting to share some stories about scaling around the world using Istio and Google Kubernetes Engine.</p><h3>The Architecture</h3><p>Before we start going over the issues, I wanted to take a moment to give some context on the architecture we wanted to achieve.</p><p>The challenge for the SRE team was to <em>improve availability and scale to new regions</em> <em>while meeting strict data residency requirements</em>. Kubernetes clusters already existed however, there was no communication between regions for failover. The chance of a cluster or single microservice going down in a region is higher than that of losing all our GCP sites entirely. It was our goal to boost availability for our customers even during a regional outage.</p><p>I kept a list of some of the service mesh requirements the team cooked up:</p><ul><li>Support HTTP2 and HTTP</li><li>Authentication/authorization handling</li><li>Communication authentication (mTLS)</li><li>Locality failover</li><li>Support for multi-cluster</li><li>Traffic control and security policies</li><li>Satisfy our data residency requirements</li><li>Great observability tools and metrics</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HH-msaVNu8ltWFqxVpsXcw.png" /><figcaption>Failover between multi-cluster service mesh</figcaption></figure><p>To create the globally distributed system the team desired, our Kubernetes clusters would need a <strong><em>service mesh facelift</em></strong>.</p><h3>Migration</h3><p>Great, now that we have our requirements I now can take you through the migration and challenges we encountered along the way.</p><p>When Achievers first started using Kubernetes in 2019, we used <a href="https://konghq.com/">Kong</a> as an API gateway. Since the team was already familiar with the Kong product, we decided to investigate their service mesh <a href="https://kuma.io/">Kuma</a> first. Kuma was simple to configure, but we felt it wasn’t mature enough at the time for our multi-cluster needs. <a href="https://linkerd.io/">Linkerd2</a> was also considered, however (again, at the time) multi-cluster was still new and there weren’t a lot of documented cases for <a href="https://istio.io/latest/docs/tasks/traffic-management/locality-load-balancing/failover/">locality</a>. We ultimately chose Istio for the service mesh due to advancements in Envoy, <a href="https://istio.io/latest/docs/setup/install/multicluster/">multi-cluster</a>, and their full gateway features. Our ingress requirements were simple, so we decided to scrap Kong altogether and use <a href="https://istio.io/">Istio</a> for a gateway as well as a service mesh.</p><p>The process of enabling sidecars and virtual services alongside the legacy Kong gateway was a piece of cake. Once serious usage ramped up in production, a few issues came to light.</p><h3>Second-class sidecar citizens</h3><p>When migration was completed in late 2020, developers noticed pods intermittently crashed during startup. It became apparent that the issue was limited to services that required outbound calls on pod startup. Some containers in a pod attempted to start before the istio-proxy container was ready which caused outbound requests to fail. The <a href="https://github.com/istio/istio/issues/11130">issue with sidecar</a> containers in Kubernetes is that you have no guarantee on the order of execution.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*W4c0EuMgsCe62oD_E04ZgA.png" /><figcaption>Successful vs bad startup order of containers in a single pod</figcaption></figure><p>To solve this issue we set the <a href="https://github.com/istio/istio/issues/33911">holdApplicationUntilProxyStarts</a> cluster <a href="https://discuss.istio.io/t/deprecated-holdapplicationuntilproxystarts-cant-find-any-information-about-this/9177">configuration for all services</a>. This allows for applications to delay their startup while the istio-proxy becomes ready to accept traffic.</p><h3>Limits, Limits, LIMITS</h3><p>Another side effect of the migration was horizontal pod autoscaling values became skewed due to the addition of the Istio sidecar container. Some pods would scale often or not at all. In other cases, Istio would push configuration updates to the envoy proxies and multiple services would scale together. Horizontal pod autoscaling uses the sum or average of all container CPU/Memory requests for a pod when determining when to scale. Adding a sidecar to a pod alters the total amount of CPU and memory, skewing the scaling values.</p><figure><img alt="difference of limits and requests with the addition of an istio sidecar" src="https://cdn-images-1.medium.com/max/1024/1*7nlAPGMbW8Zo_Xi7yBQj1Q.png" /><figcaption>After adding the istio-proxy you will have less room to autoscale</figcaption></figure><p>The solution was to review service CPU and memory usage with the sidecar enabled and then reconfigure targetCPUUtilizationPercentage on the Horizontal Pod Autoscaler.</p><h3>503, the Envoy wet blanket error</h3><p>After a few months in production, one engineer came to me asking for assistance troubleshooting an ongoing headache. Their application began seeing frequent<em>503 UC upstream_reset_before_response_started </em>errors once they migrated to Istio. Troubleshooting <em>503s</em> can be tricky in Envoy because they are treated as a <em>“blanket error”</em> and can cover a wide range of issues. The SRE team jumped in to take a deeper dive into the problem.</p><p>First, we looked at <a href="https://cloud.google.com/blog/products/containers-kubernetes/kubernetes-best-practices-terminating-with-grace">Kubernetes</a> for some help. Setting <a href="https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/">terminationGracePeriodSecond</a> allows for extra time before fully terminating pods. The assumption was maybe the application needs more time to drain connections. The value was set pretty high to test with but still no success with reducing 503s.</p><p>Next, we thought maybe connection pooling on the <a href="https://istio.io/latest/docs/reference/config/networking/destination-rule/#ConnectionPoolSettings-HTTPSettings">destination rule</a> was misconfigured and opted to tweak maxRequestsPerConnection to disable keepalives. We played with all the options available but determined Istio was configured correctly.</p><pre>---<br>apiVersion: networking.istio.io/v1beta1<br>kind: DestinationRule<br>metadata:<br>  name: my-app-destinationrule<br>  namespace: default<br>spec:<br>  host: my-app<br>  trafficPolicy:<strong><br></strong>    loadBalancer:<br>      simple: LEAST_CONN<br>    connectionPool: # Timeouts and connection settings<br>      tcp:<br>        maxConnections: 10<br>        connectTimeout: 1000ms<br>      http:<br>        http1MaxPendingRequests: 10<br>        http2MaxRequests: 100<br>        <strong>maxRequestsPerConnection</strong>: 10<br>        maxRetries: 5<br>    outlierDetection:<br>      consecutiveErrors: 3<br>      interval: 30s<br>      baseEjectionTime: 60s<br>  subsets:<br>  - name: v1<br>    labels:<br>      version: &quot;v1&quot;</pre><p>At this point, it <em>had</em> to be in the application itself. The SRE team dug deeper and found Nodejs does not pass termination signals to child processes and therefore never receives a <a href="https://hackernoon.com/graceful-shutdown-in-nodejs-2f8f59d1c357">SIGTERM</a> from Kubernetes.</p><pre>process.on(&#39;SIGTERM&#39;, () =&gt; {<br>  console.info(&#39;SIGTERM signal received.&#39;);<br>  console.log(&#39;Closing http server.&#39;);</pre><pre>  setTimeout(async () =&gt; {<br>    await server.close();<br>    console.log(&#39;Server Stopped!&#39;);<br>  }, 10000);<br>});</pre><p>This small code block, along with <a href="https://github.com/krallin/tini">introducing an init process</a> managed to stop the 503 errors and resolve the teams&#39; reliability problem.</p><p>Troubleshooting Istio 503s can be overwhelming, to say the least.</p><h3>ET can’t phone home!</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*ZEpS7W2UDbARye1in-OBMA.png" /></figure><p>With deprecation day for <a href="https://kubernetes.io/docs/concepts/policy/pod-security-policy/">PodSecurityPolicies</a> coming soon, the SRE team decided to upgrade Istio to benefit from the new <a href="https://istio.io/latest/docs/setup/additional-setup/cni/">Container Network Interface</a> (CNI) feature. The Istio CNI plugin replaced the istio-init container that performs the same networking functionality but without requiring Istio users to enable elevated Kubernetes RBAC permissions. After upgrading Istio we began seeing some containers unable to communicate to the Google Metadata service causing pods to crash.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MM4NQtN9jDP9j-i2DfsEfA.png" /><figcaption>Istio annotation to bypass sidecar egress</figcaption></figure><p>The CNI allows you to bypass a list of IP ranges to exclude from the Istio sidecar. Adding the <a href="https://github.com/istio/istio/issues/9304">excludeOutboundIPRanges</a> annotation to the Kubernetes pod yaml resolved our container startup issue.</p><h3>Out of our hands <a href="https://emojipedia.org/folded-hands/">🙏</a></h3><p>As more services were deployed over the year, our Google Kubernetes Engine (GKE) clusters took on more load and resources. This brought a new GKE issue to light. Suddenly, a large number of failure alerts on gke-metric-agent pods began, and horizontal pod autoscaling intermittently stopped working for microservices. Upon investigation, we saw out-of-memory(OOM) events from GKE-metrics-agent pods. Since this deployment is managed by Google, increasing the pod limits was out of our direct control. Hoping this would be an easy fix, we reached out to Google Support asking them to bump the memory limits on the pod spec.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*_DD6wBbjndxisZcp3UIo_w.png" /><figcaption>kubectl output of failing gke-metrics-agent pods</figcaption></figure><p>What we heard back was disheartening. The Google support team is unable to change limits on managed deployments. On top of that, <a href="https://issuetracker.google.com/issues/180333586">we hit a bug</a>. Larger type machine clusters running a vast number of pods will run into performance issues and crash the metrics server. GKE has a <a href="https://cloud.google.com/kubernetes-engine/quotas">limit of 110 pods per worker</a>, so <em>we thought we were fine at around ~64 pods</em>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/0*wX5OjsyNnY8j1vBk.jpg" /></figure><p>At this point, we had two options:</p><p>1. Drop pods per worker (and decrease machine type)<br>2. Investigate deploying metrics manually and disable Google monitoring API on the cluster</p><p>It was decided to drop the pods per worker node to hopefully stop the out-of-memory errors. We heard rumbles online about the <strong>magic number being 30 pods for a single worker</strong>. After dropping the number to 30 from 64, the metrics server stopped crashing but still received high CPU alerts. The downside of the workaround was that our node count jumped significantly. Even with the smaller machine type, it will now cost more for disks and traffic costs. The issue was eventually solved upstream by Google.</p><h3><strong>Conclusion</strong></h3><p>As a final note, throughout our journey, we learned that troubleshooting distributed systems can be overwhelming when you first start. It can take some time to understand how to visualize and leverage the abundance of metrics, and that’s why having proper observability is critical to the success of your multi-region service mesh.</p><p>Next month I’ll share more about how Achievers use metrics, monitoring, and overall observability of multi-cluster Istio to solve problems for engineers.</p><p>—</p><p>Have you had a similar experience as us? <br>We would love to hear your stories in the comments.</p><p>Oh, and if you like what you see? <a href="https://jobs.lever.co/achievers">We are hiring</a> A-Players to join the team!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=30ad6d393d04" width="1" height="1" alt=""><hr><p><a href="https://achievers.engineering/scaling-production-globally-service-mesh-face-lift-part-1-30ad6d393d04">Scaling Production Globally — Service mesh face-lift (Part-1)</a> was originally published in <a href="https://achievers.engineering/">Achievers Engineering</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Documentation Part 2: Still running through the 6 with documentation woes]]></title>
            <link>https://achievers.engineering/documentation-part-2-still-running-through-the-6-with-documentation-woes-ce84d6bbc5ea?source=rss-aae990837eda------2</link>
            <guid isPermaLink="false">https://medium.com/p/ce84d6bbc5ea</guid>
            <category><![CDATA[developer-experience]]></category>
            <category><![CDATA[documentation]]></category>
            <category><![CDATA[docusaurus]]></category>
            <category><![CDATA[engineering]]></category>
            <category><![CDATA[automation]]></category>
            <dc:creator><![CDATA[Stefan Kolesnikowicz]]></dc:creator>
            <pubDate>Mon, 29 Nov 2021 14:02:51 GMT</pubDate>
            <atom:updated>2022-03-21T04:50:32.725Z</atom:updated>
            <content:encoded><![CDATA[<p>It can be hard to find passion in technical documentation. It is tiresome, repetitive, and keeping it up to date can feel like a constant struggle. Even though we know good documentation is crucial, engineering teams often fail at maintaining it. Our team at <a href="https://achievers.com/">Achievers</a> faced many common issues with our documentation. It was scattered, out of date, and difficult to search.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/582/1*IYJJX-YlIwA_t8fHoGKRCg.jpeg" /></figure><p><a href="https://achievers.engineering/documentation-revival-part-1-how-to-tame-your-documentation-87660e8ae7dd">In the first part of our struggle</a>, we review the improvements we made to our Confluence Space where we hosted thousands of old documents from the last ten years. While we made progress within Confluence, we are not entirely happy with Confluence itself. This is 2021, and our documentation looks so … <em>2001</em>.</p><p>Our documents in Confluence continued to fall out of date, and out of hand, so we decided to move it with the code itself. Code changes, or new features, would require the engineer to update the documentation in the same peer review as the change. Confluence also looked <em>very</em> out of date. Achievers needed something <em>fresh</em>. We needed to create a virtual Paradise<em> </em>as a clear departure from the descent into the <em>Pits of Confluence Hell</em>. As a starting point, we experimented writing documentation on our GraphQL Gateway microservice in GitHub Pages using the template<a href="https://pmarsceill.github.io/just-the-docs/"> just-the-docs</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UXMHha9427rHHlhUudYvjg.jpeg" /><figcaption>GitHub Pages starting point</figcaption></figure><p>The resulting system was a success in many respects. Most importantly, it led to less confusion and questions from the developers. Some other teams also joined the experiment by adopting the same structure for their microservice. Those teams have no excuse not to update their documentation because now it is required to start a new service or push new features. Following the new workflow, we saw a dramatic drop in out of date information.</p><p>While this was promising for the future, it made navigation more complicated because it adds another place to host our documentation. Now we had Confluence and scattered<em> (but pretty) </em>markdown across GitHub. Even two places are too many to search for information.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*tATfXxQNdKHhfR56esKffQ.jpeg" /></figure><p>On top of that, in our routine feedback survey conducted by the Developer Experience team, unsurprisingly, documentation came up as a pain point again. The survey responses gave us more detailed information about where we could make improvements. For example, we learned engineers enjoyed having documentation in their source code repos and writing in markdown but found it hard to search for topics across repositories. This feedback was immensely helpful because it helped us build a short list of requirements:</p><blockquote>- Code and documentation must live together</blockquote><blockquote>- Nested directories (more than 3)</blockquote><blockquote>- Supports Markdown</blockquote><blockquote>- Centralized for easy searching</blockquote><blockquote>- (Bonus) Hosted on GitHub pages</blockquote><p>Most of our services and internal tools documents were now written in markdown and kept with the code. The plan was to push the `docs/` directory from different repos to a centralized GitHub repository for easy searching, without compromising the information’s source of truth. Since this is an internal site, using GitHub to host pages is ideal.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*85gX_hPg_yd2Q9RWMqvSqA.jpeg" /><figcaption>Centralized documentation workflow</figcaption></figure><p>Unfortunately, the GitHub Pages template we used initially didn’t fit our nested level criteria, so we had to go back to the drawing board. After some more research and trying a few products, we stumbled across <a href="https://docusaurus.io/">Docusaurus</a> written by Facebook. Docusaurus was easy to set up and had extra functionality that exceeded our expectations. Best of all was the ability to just drop markdown files into a directory and have everything<em> just work!</em> Other features we didn’t initially know about but now cannot live without are:</p><blockquote>- <a href="https://docusaurus.io/docs/markdown-features/code-blocks">Built in code highlighting</a></blockquote><blockquote>- <a href="https://docusaurus.io/docs/search#using-algolia-docsearch">Algolia DocSearch</a></blockquote><blockquote>- <a href="https://docusaurus.io/docs/markdown-features/admonitions">Notes, Tips, Caution banners</a></blockquote><blockquote>- <a href="https://docusaurus.io/docs/api/themes/configuration">Dark mode</a></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*D95QSZuq9NFijBRRu0KfRQ.png" /><figcaption>Docusaurus default site in dark mode</figcaption></figure><p>Once Docusaurus was hosted on GitHub pages, the focus shifted to automation to bring in pages from other repos as part of the CICD pipeline. A new step in each pipeline will trigger a sync process of the `docs/` directory to the central documentation repo only when a change is made to files. This way the <em>source of truth still lives with the code.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/704/1*lOtnyBy4dGkeuQtqx01pHA.png" /><figcaption>Lifecycle of documentation</figcaption></figure><p>Hopefully, we solved Achievers’ Documentation woes for the last time, or at least for the next ten years. Achievers has been in a rapid stage of growth for the last two years. We are growing very quickly and <a href="https://jobs.lever.co/achievers?department=Engineering"><em>hiring a lot</em>,</a> so, ensuring our documentation is accurate and detailed for all employees is critical to our success. Listening to our engineers’ feedback is important to us, and if something doesn’t work, we adjust along the way. Since our efforts on keeping documentation close to code, we have seen a huge reduction in out-of-date documents. Leveraging Docusaurus has also increased motivation and higher usage from the engineering teams. A <em>fresh look</em> can be inspiring all by itself. While we don’t plan to sunset our Confluence site completely any time soon, we do intend to move most of our technical documentation to this new central repository structure.</p><p><em>— <br>Check out our other articles, including </em><a href="https://achievers.engineering/enter-the-abattoir-ee5e2019f0b3"><em>Abattoir: Building `a la carte` gitops tooling for Engineers</em></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ce84d6bbc5ea" width="1" height="1" alt=""><hr><p><a href="https://achievers.engineering/documentation-part-2-still-running-through-the-6-with-documentation-woes-ce84d6bbc5ea">Documentation Part 2: Still running through the 6 with documentation woes</a> was originally published in <a href="https://achievers.engineering/">Achievers Engineering</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Enter the Abattoir]]></title>
            <link>https://achievers.engineering/enter-the-abattoir-ee5e2019f0b3?source=rss-aae990837eda------2</link>
            <guid isPermaLink="false">https://medium.com/p/ee5e2019f0b3</guid>
            <category><![CDATA[gitops]]></category>
            <category><![CDATA[self-service]]></category>
            <category><![CDATA[distributed-systems]]></category>
            <category><![CDATA[argo-cd]]></category>
            <category><![CDATA[kubernetes]]></category>
            <dc:creator><![CDATA[Stefan Kolesnikowicz]]></dc:creator>
            <pubDate>Tue, 27 Apr 2021 12:24:28 GMT</pubDate>
            <atom:updated>2021-08-10T12:55:56.582Z</atom:updated>
            <content:encoded><![CDATA[<h4>Building `a la carte` gitops tooling</h4><p>While starting our road to microservices at <a href="https://achievers.com/">Achievers</a>, the SRE team had new challenges to solve. Until recently, the team was following a more traditional centralized model. Need new infrastructure? Please submit a ticket and wait on us.</p><p>One way we wanted to change the culture was by empowering engineering teams to design, configure, deploy and own their services in production. Who knows the code best? The people who write it! This would be a huge shift for Achievers, as developers previously only focused on business logic. We knew we needed some sort of automation to set up namespace before engineers could deploy to it. We started to ask around to gather requirements from the different teams on what the basic building blocks of a service needs. This list was long!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DxqeoMR2TScstKDJxKbvcg.png" /><figcaption>What dependancies are needed for a service to work in a namespace?</figcaption></figure><p>In response the SRE team created <strong>Abattoir</strong>, a set of self-serve tooling to configure permissions, cloud resources, monitoring/alerting, provision namespaces, and deploy microservices. Other features which can be enabled on deployments include canary deployments, ingress rules, and service mesh configuration. This is achieved by a series of feature flags defined in yaml. It was important to the SRE Team that the tools are flexible enough to scale for our global infrastructure and anyone can add features themselves without us being a blocker.</p><h3>Tooling</h3><p>Spending the time upfront getting the right tool for the job will pay off long term.</p><ul><li>Boilerplates/Shared libraries</li><li>Drone</li><li>Tilt</li><li>Argocd</li></ul><p>When developing our initial tooling, we decided to keep the illusion that all our services will look similar. While having a template for services can be controversial, we decided having a boilerplate was a great starting point for engineers. Pass in a few variables and a developer can quickly bootstrap a new build repo, fit to our standards. Some of the automated configurations include repo structure, container names, CICD configuration, with base unit and integration tests. Developers can then start writing code and deploy it within minutes. The boilerplate has advanced over time and is a great starting point for training new hires, starting a new service, or reference. Having a boilerplate with a standard set of tools and repository has also helped when people move between engineering teams or contribute to a different project.</p><p>All supported languages have a boilerplate and set of shared libraries. Some of our base libraries include:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/874/1*_BkVT_HlhPYxdha50_eK_w.png" /></figure><p>Having tooling for automation builds, tests, and deployments were next on our list. We needed a flexible container native tool for builds. Many CICD tools are overly complicated and we felt our requirements were pretty simple! We came across <a href="https://drone.io/">Drone.io</a> and fell in love. Drone offers us runners which run steps as container images. A <em>drone.yml</em> file lives in the build repo where developers can define their service pipelines. Drone is so flexible it allows us to build our own plugins, or easily write containers to do specific tasks.</p><p>Our next challenge was engineers getting frustrated with legacy development tools and resource limitations on their local machines. We wanted to solve this issue on our new platform to help speed up developer work cycles. Since an engineer may need to run many services at once, we wanted to be able to offload some of this workload onto a Kubernetes cluster. SRE built tooling around <a href="https://tilt.dev/">tilt.dev</a> to allow engineers to build locally, deploy remotely, and test. Changes made on the local machine would get pushed to a remote Kubernetes cluster which can be hit through port-forwarding for testing. Because we still needed integration to our existing platform for development, we use tilt to spin up partial or full environments on the fly. This also allows us to turn everything off when not in use. Tilt uses Starlark which is easy for engineers to understand and improve on as it is just a python dialect.</p><p><a href="https://argoproj.github.io/argo-cd/">ArgoCD</a> helped solve a lot of issues we were facing with deployments and bootstrapping services to clusters. Our team wanted to take the analogy “keep cattle not pets” to a new level by treating Kubernetes clusters as cattle. Provisioning full environments quickly using gitops and decentralized ArgoCD instances would help us accomplish this. ArgoCD also offers other features that are appealing to use such as canary deployments. Adding integration into monitoring metrics for analysis of canary traffic is invaluable in a distributed environment. Testing with live traffic in production deployments helps build confidence in the code we roll out.</p><figure><img alt="Abattoir workflow diagram" src="https://cdn-images-1.medium.com/max/1024/1*bgLBYP3KlClVrybgzA9usw.jpeg" /><figcaption>Abattoir workflow diagram</figcaption></figure><h3>Abattoir</h3><p>The Abattoir suite consists of three parts:</p><ul><li>Configuration and provisioning of service resources and permissions (buckets/pubsub/secrets/alerting/monitoring/etc)</li><li>Kubernetes deployment values overrides (replicas/canary/service mesh/metrics/ingress/etc)</li><li>Environment Deployment Definition (ArgoCD managed repo)</li></ul><p>We started with terraform code to lock down permissions for each namespace for external services, such as secrets, storage buckets and pubsub. Eventually, the configuration became overly complicated. Engineering teams had more requirements that made the terraform code complex, difficult to read and hard to reproduce. Engineers had no experience with Terraform before, and the learning curve was going to be a challenge. We decided to keep the Terraform code a facade to engineering teams by defining all service specs in yaml format. Yaml seemed like the best option because developers are already configuring their Kubernetes configuration as helm values. This also allows for the use of advanced data objects and is cleaner for engineers to read and replicate code. As a result of switching to a yaml format, the number of errors in PRs cut down significantly. Automated testing and linting also became easier after everything was converted to yaml.</p><p>Example structure:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/874/1*_SawhI8m1pTHql7H50Z3XQ.png" /><figcaption>example yaml spec for a microservice</figcaption></figure><p>All services are deployed with a set of sensible defaults. Overrides can be supplied through feature flags and configuration within the Abattoir service spec. Developers who want to contribute or make a change can submit a PR. Additional optional engineer namespaces are also available if anyone needs a personal workspace.</p><p>As engineers grow their services and add new features, Abattoir is there to serve them through their microservices lifecycle. Need to add a new alert for monitoring? No problem! Need to write to a specific pubsub topic? We gotchu! Add a PagerDuty alert or a Slack notification? Easy! All the features an engineer would need to go to production is at their fingertips and just a PR away.</p><p>While gitops has forced us to use more repos than we have previously needed in a lifetime, it gives us more flexibility over our service deployments. It is worth noting, having many repos in your gitops model may be confusing to some users. It’s up to you as an SRE or devops engineer to give good training and documentation to support the external teams.</p><p>This self-serve model has saved time across the engineering and SRE teams. It was a significant undertaking to change Achievers engineering culture and tooling, but the benefits have paid off immensely. Spending the time building solid tooling early on reduced our time to production for new services. Deployments went from being scheduled, to whenever there is a code change. Engineers now hold the power to their code’s future. While enhancements are always being requested and added, we are happy that tooling and infrastructure is not a blocker in our fast-moving distributed platform.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ee5e2019f0b3" width="1" height="1" alt=""><hr><p><a href="https://achievers.engineering/enter-the-abattoir-ee5e2019f0b3">Enter the Abattoir</a> was originally published in <a href="https://achievers.engineering/">Achievers Engineering</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>