<?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 Hossein Samarrokhi on Medium]]></title>
        <description><![CDATA[Stories by Hossein Samarrokhi on Medium]]></description>
        <link>https://medium.com/@samarrokhi?source=rss-a8fbfa2b3538------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*Ad0WEIQf_u5mxonJS1x1Dg.jpeg</url>
            <title>Stories by Hossein Samarrokhi on Medium</title>
            <link>https://medium.com/@samarrokhi?source=rss-a8fbfa2b3538------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 11:42:31 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@samarrokhi/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[Johari Window: a self-awareness model]]></title>
            <link>https://medium.com/@samarrokhi/johari-window-a-self-awareness-model-3092b5fc723e?source=rss-a8fbfa2b3538------2</link>
            <guid isPermaLink="false">https://medium.com/p/3092b5fc723e</guid>
            <category><![CDATA[leadership-development]]></category>
            <category><![CDATA[self-awareness]]></category>
            <category><![CDATA[emotional-intelligence]]></category>
            <category><![CDATA[self-improvement]]></category>
            <category><![CDATA[communication]]></category>
            <dc:creator><![CDATA[Hossein Samarrokhi]]></dc:creator>
            <pubDate>Wed, 25 Mar 2020 16:46:54 GMT</pubDate>
            <atom:updated>2020-03-25T16:46:54.402Z</atom:updated>
            <content:encoded><![CDATA[<p>Have you ever thought what if you were that aware of your abilities that no difficult situations destroy you personally? Or, Have you ever resolved an issue that comes from upbringing? All of these behaviors come from a certain level of self-awareness.</p><p>Indeed, Self-Awareness, a key component of emotional intelligence, is the perception of one’s personality or individuality that could influence your reactions, and make you able to build positive relationships with others.</p><p>For better insight, read the following article which gets more dig into the subject in an enjoyable and simple dialect.</p><p><a href="https://markmanson.net/self-awareness">Why You Suck at Self-Awareness</a></p><p>Now that we know more about <strong>Self-Awareness</strong>, let’s see how the Johari Window Model helps to be more informed about ourselves and leads us to better communication skills including interpersonal/intergroup relationships.</p><p>The <strong>Johari Window Model</strong>, created by psychologists Joseph Luft and Harrington Ingham, is a technique for illustrating and improving self-awareness and mutual understanding between individuals. This model is highly used for a better understanding of Employer and Employee relationships.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/642/1*fl2jtwW62i9v4etvA7Xf4g.png" /></figure><ul><li><strong>Open/Arena: </strong>The behaviors that you are willing to share and both yourself and others know about. As much as this area gets bigger, you’ll build more clarity and trust.</li><li><strong>Hidden/Mask:</strong> The aspects of your personality that you are aware of but do not want others to know. It called Mask because you hide your real one.</li><li><strong>Blind Spots: </strong>What others identify, but you don’t. Regardless it is positive or negative, strength or weakness. Getting feedback in the format of “Stop, Keep, Start” (google it) can help you to get more aware of blind spots of your character.</li><li><strong>Unknown/Unconscious: </strong>What’s unknown to anyone including you.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*3MIIEVpSr4Ip6EHGnYA70w.jpeg" /></figure><p>The following video explains more about this model and the way you can use it to empower yourself with more effective communication skills.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F_aF-olRMuoQ%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D_aF-olRMuoQ&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F_aF-olRMuoQ%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/67ce8a2705425f759b7063e2355f15d5/href">https://medium.com/media/67ce8a2705425f759b7063e2355f15d5/href</a></iframe><h4>In the end</h4><p>It’s not unusual to see managers who promoted to leadership positions because of technical skills, but in such positions, you’ll need to rely more upon your interpersonal communication skills. I hope this article can help to establish trustful communication with your teammates. Please feel free to share your ideas in the comments.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3092b5fc723e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Monitoring & Observability in Distributed Systems]]></title>
            <link>https://medium.com/@samarrokhi/monitoring-observability-in-distributed-systems-fba35e6e451b?source=rss-a8fbfa2b3538------2</link>
            <guid isPermaLink="false">https://medium.com/p/fba35e6e451b</guid>
            <category><![CDATA[tracing]]></category>
            <category><![CDATA[microservices]]></category>
            <category><![CDATA[monitoring]]></category>
            <category><![CDATA[sre]]></category>
            <category><![CDATA[observability]]></category>
            <dc:creator><![CDATA[Hossein Samarrokhi]]></dc:creator>
            <pubDate>Thu, 30 Jan 2020 20:07:35 GMT</pubDate>
            <atom:updated>2020-01-30T20:07:35.952Z</atom:updated>
            <content:encoded><![CDATA[<p>Once upon a time, people used to see system monitoring as such a fancy feature, or it was limited to select a few business metrics against the database. Fortunately, I’m not such an old owl that saw those days.</p><p>Those days passed, Now, In the era of highly distributed systems and Microservices, Even running an advanced monitoring system is not adequate anymore. These services should be Observable too.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_1ryyoJvhY6jh8p1RoCHVg.jpeg" /></figure><p>This article, Initially, talks about “Distributed Systems Monitoring” and the three most popular methodologies of monitoring, then explain what the Observability is.</p><h3>What is Monitoring?</h3><p>Monitoring means gathering metrics from several services or machines, processing, aggregating to more valuable metrics, and visualizing them into easy to understand dashboards, and setting useful alerts, mostly done by DevOps or SRE guys.</p><p>Take a breath and continue to read about the three most popular methods of metrics monitoring:</p><h4>RED Method</h4><p>The RED abbreviation stands for Rates, Errors, and Duration of “Requests” that are supposed to cover the most critical issues of services and help to find out which metric to monitor next.</p><ul><li>Request <strong>Rate</strong> is the number of requests per second on edge services of non-edge ones.</li><li>Request <strong>Errors </strong>is<strong> </strong>the number of failed requests per second, mostly categorized by error codes.</li><li>Request <strong>Duration </strong>is the amount of time that takes long a request to get a response.</li></ul><h4>USE Method</h4><p>The USE methodology is suitable for identifying resource bottlenecks or errors in distributed systems. The “Resource” means all physical server functional components like CPUs, Disks, Busses, as the ideologist of this methodology, Brendan Gregg, has defined.</p><ul><li>The<strong> Utilization </strong>metric is the average time that the resource was busy by serving a work.</li><li>The<strong> Saturation </strong>metric is the degree to which a resource could not service and mostly queues requests.</li><li>The<strong> Errors </strong>metric is the number of errors that happens.</li></ul><h4>Four Golden Signals method</h4><p>The “Four Golden Signals of Monitoring” is a methodology for monitoring critical metrics defined as essentials of delivering highly available services by Google site reliability engineers. It is the RED methodology, including the Saturation metric.</p><p>The<strong> Latency </strong>metric<strong> </strong>is the amount of time it takes to send a request and get the response. This metric differs from service to service and end-point to end-point.</p><p>Keep in mind to find the best threshold, never neglect spikes in your response times graph, and keep latency of the succeed request from errors.</p><p>The <strong>Traffic</strong> metric<strong> </strong>is the number of requests flowed through the network, including the traffic you get on edge services or the transport of communication between internal services.</p><p>The<strong> Errors </strong>metric is the number of errors has logged — misconfigurations may cause some errors; others may be a result of software bugs that slide from the tests. For any reason, spikes or gradual increment in the numbers are not acceptable. By the way, You may never see zero in errors, so finding out the root cause is necessary. Some times errors caused by bad requests came from the client.</p><p>The <strong>Saturation </strong>metric indicates the utilization of CPU, Disk, Ram, or Network and lets you readjust service resources before performance degrades.</p><h3>What is Observability?</h3><p>Observability is more than monitoring some metrics or logging events in ELK. Observability is more about the strategies that imply how to put all necessary information together in a way that helps to <strong>detect</strong>, <strong>react</strong>, and <strong>recover</strong> faster when errors or disasters happen.</p><h4>Three Pillars of Observability</h4><p>The following three items are necessities of Observability that are known as “Three Pillars of Observability.”</p><ul><li><strong>Logs</strong>: that contains information about an event in the system, commonly in structured formats like JSON or Key/Value pairs, including level that indicates the severity of the event. Logs are as easy to add as writing one line of code in propper place; on the other hand, they are resource costly too.</li><li><strong>Traces</strong>: that are an illustration of related events in a distributed system, which implies what happened to that request, where an error occurred, or what a computation resulted in service. Commonly, tracing is a complicated operation and has overhead on the server. Fortunately, Service Meshes made distributed tracing as easy as setting some headers for the requests, like Istio.</li><li><strong>Metrics</strong>: it is a measurable numeric data mostly represented in a time-series format. Running queries against them are not resource expensive and suited to trigger alerts. Transferring and storage of metrics have constant overhead contrary to logs storage.</li></ul><h3>In the end</h3><p>Now that we know about Monitoring and Observability, it’s time to think about how to develop observable applications and services. And decide about the methodologies of monitoring, which one is suitable for your solution. Even you may need to use two of them concurrently.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fba35e6e451b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Cloud Design Patterns: Load Leveling]]></title>
            <link>https://medium.com/@samarrokhi/cloud-design-patterns-load-leveling-95a036ba78df?source=rss-a8fbfa2b3538------2</link>
            <guid isPermaLink="false">https://medium.com/p/95a036ba78df</guid>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[microservices]]></category>
            <category><![CDATA[qos]]></category>
            <category><![CDATA[software-architecture]]></category>
            <dc:creator><![CDATA[Hossein Samarrokhi]]></dc:creator>
            <pubDate>Fri, 17 Jan 2020 10:28:58 GMT</pubDate>
            <atom:updated>2020-01-18T09:37:22.173Z</atom:updated>
            <content:encoded><![CDATA[<p>Load leveling means to smoothen the fluctuated load that can cause the services to get out of access or APIs to get timed out. In this article, we review the cloud design patterns that can help to smoothen intermittent load on pods in a Kubernetes cluster.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*gQtHVR4ZxAlIPgbk64Jttg.jpeg" /></figure><p>In industry, Load leveling is a method for reducing large fluctuations in customer demand. This definition mostly used in Six Sigma performance improvement methods, but fuck it and stick to its meaning in the technical world.</p><p><strong>Problem:</strong> Most of the solutions in a Kubernetes cluster involved in communicating with small services, inside or outside of your cluster (third party services). It can be challenging to predict the volume of requests to the services at any time. Sometimes an unexpected increase in the number of concurrent requests can cause service failure. So how could we prevent traffic spikes impacts on service availability, and make fluctuations to become smoothen and leveled?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/822/0*NSfH4IG3wfVeBizq" /></figure><p><strong><em>Solution #1</em>: I</strong>mplement the <strong>Throttling Pattern</strong>. This way, you limit services resource consumption, when resource utilization passed the threshold, then throttle requests or unnecessary features gently and keep room for more critical services to perform. But there is a concern; If the service is not granular enough, this approach does not solve your problem. Anyhow you supposed to configure resource limitations of your containers.</p><p><em>Read more: </em><a href="https://cloud.google.com/blog/products/gcp/kubernetes-best-practices-resource-requests-and-limits"><em>Kubernetes best practices: Resource requests and limits</em></a></p><p><strong><em>Solution #2</em>: </strong>there are excellent solutions that always work, Rate limits. You can limit the amount of traffic flooded to the service strictly. No matter you use Ingresses like <a href="https://github.com/kubernetes/ingress-nginx">Nginx</a>, <a href="https://docs.traefik.io/providers/kubernetes-ingress/">Traefik</a>, <a href="https://konghq.com/kong/">Kong</a>, or a Service Mesh like <a href="https://istio.io/">Istio</a>, there is always a way to handle rate limits. I found Istio as a Service Mesh more friendly and easy to use.</p><p>You can also take benefits of open-source gateways like <a href="https://github.com/datawire/ambassador">Ambassador</a> to manage load shedding characteristics, and ensure that specific types of requests take precedence versus others.</p><p><em>Read more: <br>- </em><a href="https://glasnostic.com/blog/kubernetes-service-mesh-what-is-istio"><em>The Kubernetes Service Mesh: A Brief Introduction to Istio</em></a><em><br>- </em><a href="https://www.getambassador.io/user-guide/advanced-rate-limiting/"><em>Advanced Rate Limiting using Ambassador</em></a></p><p>Got better, but there are still concerns that cause you to try a more dynamic but complex solution.</p><p>Imagine a Message Provider that provides SMS and MMS web APIs. You have Service Level Agreement (SLA) with paid customers and dealt for minimum Quality of Service (QoS), so you need to prioritize requests to provide minimum latency in the delivery of SMSs and maximum availability of service. In this case, the solution we talk about bellow helps you.</p><h3>Queue-Based Load Leveling</h3><p>The idea is simple, gateway services get the request and publish them to desired services through a message broker, and after processing requests, service sends the responses to the requester over message broker again.</p><p>Considering the specifications of the message broker you choose, you should implement all the logic of request and response. Anyhow the mechanism is the same. It doesn’t matter how many concurrent requests flooded to the gateways; services consume the amount that they can process. This way, you could expect a leveled amount of traffic load on your services.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/520/0*zOfRUDzPqdOVO7s7" /></figure><p>What does this figure say? The requests get to the Gateway services, the hexagons on the left side. The gateway services are dummy and only publish the Request messages decorated by a <strong>Correlation Identifier</strong> and a <strong>Reply Queue</strong> name to the Request queue.</p><p>The services shown with a hexagon on the right side, consume the Requests queue, and after processing, publish the responses to the reply queue by keeping the correlation identifier meta.</p><p><strong>Correlation identifier</strong> lets to match request process and response messages, and the <strong>Reply Queue</strong> name helps to deliver responses to the corresponding requester service.</p><p>Now let’s get back to the Messaging System example; the following diagram shows a more complex scenario to handle Quality of Service (QoS) based on customers and the size of bulk messages.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/877/1*Sp1uyte3d771E9ZboX_rsQ.png" /></figure><p><strong>Note #1:</strong> this approach increases response latency. If response time is valuable, so think about using it twice.</p><p><strong>Note #2:</strong> do not forget about cookies and headers. It would be best if you transform them into the target service.</p><p><strong>Note #3: </strong>based on the message broker that you choose, you may need to handle timeout functionality by yourself.</p><p><strong>Note #4:</strong> In your implementation, look after message ordering, restarting failed instances, how to retry failed requests, and ensuring the reliability of the messaging system.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=95a036ba78df" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>