<?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 Arnau Guadall Godino on Medium]]></title>
        <description><![CDATA[Stories by Arnau Guadall Godino on Medium]]></description>
        <link>https://medium.com/@arnau.guadall?source=rss-3e2063d8bb02------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*AUJoyEtIxfGaqfvxNCfNZw.jpeg</url>
            <title>Stories by Arnau Guadall Godino on Medium</title>
            <link>https://medium.com/@arnau.guadall?source=rss-3e2063d8bb02------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 04:47:34 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@arnau.guadall/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[Latency Whack-a-Mole: Our Renderer’s Sawtooth Mystery Solved]]></title>
            <link>https://medium.com/typeforms-engineering-blog/typeforms-sawtooth-mystery-solved-8051550ce780?source=rss-3e2063d8bb02------2</link>
            <guid isPermaLink="false">https://medium.com/p/8051550ce780</guid>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[datadog]]></category>
            <category><![CDATA[engineering]]></category>
            <category><![CDATA[typeform]]></category>
            <dc:creator><![CDATA[Arnau Guadall Godino]]></dc:creator>
            <pubDate>Thu, 04 Jul 2024 10:46:37 GMT</pubDate>
            <atom:updated>2024-07-04T14:48:18.852Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="Diving into the mystery" src="https://cdn-images-1.medium.com/max/1024/1*cq6rSFF8EVy7pZqqs9n5PQ.jpeg" /><figcaption>Diving into the mystery</figcaption></figure><h3>Introduction</h3><p>Ever notice how technology keeps an eye on itself? Tools like <a href="https://www.datadoghq.com/">Datadog</a> help us track important metrics, like how fast our systems respond to requests. But how do you dig deeper and find a solution when those numbers start acting strange?</p><p>This is what happened to us recently, and in this post, we would like to share the process of our investigation into an interesting performance issue in one of our central services in <a href="https://www.typeform.com/">Typeform</a>, the <strong>Renderer</strong>. It is responsible for displaying forms to end users, making it one of our core services. As the entry point for all forms, it handles a substantial amount of traffic — <strong><em>millions of unique visits per day</em></strong>! Given its critical role, ensuring the Renderer responds quickly and efficiently is vital for a good user experience.</p><p>After we deployed a new version of this service, updating many dependencies and some adjacent code, a curious Sawtooth pattern developed when plotting the response time. One morning, while sipping a cup of coffee and looking at the Datadog graphs, we couldn’t help but notice this strange pattern. We were lucky because we deploy the renderer quite frequently, which means that the accumulation of response times resolved itself for a few hours whenever we deployed. But after paying more attention, we saw the renderer’s response time increase and increase for about a day until a sudden drop to “normal,” then repeating that same pattern. A quick analysis showed that the drops in response time were caused by container restarts, either intentionally during deployments or when Kubernetes deemed them unresponsive.</p><figure><img alt="Average request latency per endpoint" src="https://cdn-images-1.medium.com/max/1024/1*IDwOey1vbpFdxYhay_Y8zg.png" /></figure><p>Reverting the change would have been an option, but we needed to update those dependencies at some point, and the nature of the issue made it difficult to reproduce outside production. And anyway, why would we let this opportunity pass to try out some nice tooling and learn something in the process?</p><p>In this post, we’ll walk you through how we figured out what was happening, from spotting the problem to fixing it. It’s a journey that reminds us why keeping a close watch on our systems is so important.</p><h3>Root Cause Analysis</h3><p>To tackle the issue, we first started collecting all the information we had available:</p><h4>Metrics and Tracing</h4><p>Tools like <a href="https://docs.datadoghq.com/metrics/">Datadog Metrics</a> are really great for detecting that there is a problem and even pinpointing the time it first occurred. We could even confirm and narrow down the issue with distributed tracing.</p><p>For example, we found that the renderer was at times taking about 100ms to call the service which stores form definitions, forms-api where it itself only took a few milliseconds to process the request. This discrepancy between outgoing and incoming span durations was suspicious to us. Even though most time is naturally spent on the network and waiting for responses, the renderer was spending much more time in the code calling the API and processing the response than we had expected.</p><figure><img alt="forms-api GET (red) is the span that the renderer generates for making a call to Forms API and it takes 103 ms. Forms API itself retrieves the form from the cache and returns the form definition after only 6ms. The discrepancy is usually spent in network transmissions, but almost 100ms spent on the network seemed excessive and did not match our experience from interactions between other services." src="https://cdn-images-1.medium.com/max/1024/1*-zvGyzZWVjKM67iJIhv2XQ.png" /><figcaption>forms-api GET (red) is the span that the renderer generates for making a call to Forms API and it takes 103 ms. Forms API itself retrieves the form from the cache and returns the form definition after only 6ms. The discrepancy is usually spent in network transmissions, but almost 100ms spent on the network seemed excessive and did not match our experience from interactions between other services.</figcaption></figure><p>We still didn’t have enough to locate the issue. We needed more details about where the service behaves oddly, so we ran a Profiler. However, we failed to reproduce the issue locally with artificial traffic, and even if we could have, it seemed that it would only occur after about a day. This is why we chose to collect additional Node.js runtime metrics and set up the live, sampling Datadog profiler.</p><h4>Runtime Metrics</h4><p>We also added Runtime Metrics to our toolkit. These metrics gave us important information like how often the Event Loop was interacting, any delays in the Event Loop, and details about memory and CPU usage. With this complete set of data, we began a thorough investigation to understand why our system was experiencing latency issues.</p><figure><img alt="The CPU usage was not showing any congestion but a slight decrease after the deployment" src="https://cdn-images-1.medium.com/max/468/1*jbIvBAPCGVlk1tplrHI-kg.png" /><figcaption>The CPU usage was not showing any congestion but a slight decrease after the deployment</figcaption></figure><figure><img alt="The memory used was stable at all times" src="https://cdn-images-1.medium.com/max/465/1*-G8RfTj2Gaf9B9VMqfkCnA.png" /><figcaption>The memory used was stable at all times</figcaption></figure><figure><img alt="The Event Loop delay showed that started building up and right after deployment would drop immediately." src="https://cdn-images-1.medium.com/max/469/1*fMzLBWiNmiIA0yRADyxQ7A.png" /><figcaption>The Event Loop delay showed that started building up and right after deployment would drop immediately.</figcaption></figure><p>During the period that the response time latency accumulated, we observed an increase in CPU usage and the event loop delay. The more delays, the more congested the instance running our service was. However, we did not observe an increase in memory usage. At this point, we started suspecting expensive object creation somewhere hidden in the code to be the culprit.</p><h4>Profiler</h4><p>The <a href="https://docs.datadoghq.com/profiler/">Datadog Profiler</a> allows us to choose different time frames and compare their flame graphs. It even conveniently highlights functions in which more time is spent in a given sample compared to another.</p><p>In our case, we knew that the system sometimes behaved well (after any deployments) and would degrade gradually afterward. This allowed us to choose two distinct timeframes: A, representing the immediate aftermath of a deployment, and B, coinciding with the peak latency period.</p><figure><img alt="Datadog Profiler" src="https://cdn-images-1.medium.com/max/1024/1*i7dNJ5rSQ3pBGiEMdRWLYA.png" /><figcaption>Datadog Profiler</figcaption></figure><h3>Solution implementation</h3><p>As there isn’t any tooling (just yet) to automatically fix these detected issues, this is where we needed to start getting creative, digging into the code ourselves to find the most likely cause(s) or, to begin with, <em>anything</em> that stood out.</p><p>Under the H (server.js:L#5) running our service, something caught our attention: trackPrivateForm (server.js#1). This was a keyword we could search in our codebase because other files were autogenerated, which limited our debugging options.</p><figure><img alt="Datadog Profiler — trackPrivateForm" src="https://cdn-images-1.medium.com/max/1024/1*53xE4T37HLD1EkuL_aiboQ.png" /><figcaption>Datadog Profiler — trackPrivateForm</figcaption></figure><p><strong><em>We had finally localized the issue!</em></strong></p><p>The function trackPrivateForm was taking a lot more time in our “before deployment” sample with degraded performance.</p><p>After identifying the potential source of the problem, the next step was to examine the trackPrivateForm function. To avoid the repeated instantiation of new Axios instances, we moved the creation of the RudderstackAnalytics instance outside the function, ensuring it is created only once. This approach optimizes performance and resource utilization.</p><pre>// imports and stuff<br><br>const trackConversationFailed = (<br>  reason: string,<br>  { account_id: legacyAccountId, form_uid: formUid }: eventDataProps<br>) =&gt; {<br><br> // Something smells fishy in here...<br> const rudderAnalytics = new RudderstackAnalytics(<br>   RUDDERSTACK_KEY,<br>   `${RUDDERSTACK_DATA_PLANE_URL}/v1/batch`<br> )<br><br>  const eventData = {<br>    // payload<br>  }<br><br>  rudderAnalytics.track(eventData)<br>}<br><br>export const trackPrivateForm = (eventData: eventDataProps) =&gt; {<br>  trackConversationFailed(&#39;private&#39;, eventData)<br>}</pre><p>So we decided to place the RudderStackAnalytics instance outside trackConversationFailed so that would be only triggered once.</p><pre>// imports and stuff<br><br>const rudderAnalytics = new RudderstackAnalytics(<br>   RUDDERSTACK_KEY,<br>   `${RUDDERSTACK_DATA_PLANE_URL}/v1/batch`<br>)<br> <br>const trackConversationFailed = (<br>  reason: string,<br>  { account_id: legacyAccountId, form_uid: formUid }: eventDataProps<br>) =&gt; {<br>  const eventData = {<br>   // payload<br>  }<br><br>  rudderAnalytics.track(eventData)<br>}<br><br>export const trackPrivateForm = (eventData: eventDataProps) =&gt; {<br>  trackConversationFailed(&#39;private&#39;, eventData)<br>}</pre><p>When a conversation failed, we tracked those analytics with RudderStack in a middleware tool, and the code was inside each call. This also explains why the latency build-up always took many hours to be noticeable: the metric was only sent on such failure, for example when the connection had been reset by the client (e.g., a user’s browser navigating away from a form).</p><p>We can see the <strong><em>Sawtooth</em></strong> pattern before and after the fix where there are no more relevant peaks.</p><figure><img alt="Average request latency per endpoint deployment" src="https://cdn-images-1.medium.com/max/1024/1*CITheNFZ5zeORPnjsgTjIw.png" /><figcaption>Average request latency per endpoint deployment</figcaption></figure><h3>Conclusion</h3><p>This investigation was a fascinating journey to understanding the nuances of system performance and the importance of thorough monitoring. By leveraging Datadog’s metrics, tracing, runtime metrics, and profiling tools, we were able to identify and address the root cause of the latency issue effectively.</p><p>The key takeaway from this experience is the significance of proactive technical management. Regular monitoring and detailed analysis not only help in identifying performance bottlenecks but also provide valuable insights for optimizing system performance. Addressing issues promptly ensures that we maintain high-quality service for our users, even under heavy traffic.</p><p>Ultimately, this experience reinforced the importance of continuously improving our systems and staying vigilant in monitoring their health. As we continue to evolve and update our services, the lessons learned from this investigation will guide us in maintaining robust and efficient systems.</p><blockquote>👋 <a href="https://www.linkedin.com/in/arnauguadall/">Arnau Guadall</a> — Frontend Engineer at <a href="https://typeform.com/">Typeform</a></blockquote><blockquote>This article is co-authored by: <a href="https://www.linkedin.com/in/phil-langer/">Philipp Langer</a> who provided guidance, acted as an advisor throughout the process, and participated actively during the investigation and bug-solving phases</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8051550ce780" width="1" height="1" alt=""><hr><p><a href="https://medium.com/typeforms-engineering-blog/typeforms-sawtooth-mystery-solved-8051550ce780">Latency Whack-a-Mole: Our Renderer’s Sawtooth Mystery Solved</a> was originally published in <a href="https://medium.com/typeforms-engineering-blog">Typeform&#39;s RnD Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Give Effective Feedback to a Remote Team of Developers]]></title>
            <link>https://medium.com/strands-tech-corner/how-to-give-effective-feedback-to-a-remote-team-of-developers-371d96b2c82d?source=rss-3e2063d8bb02------2</link>
            <guid isPermaLink="false">https://medium.com/p/371d96b2c82d</guid>
            <category><![CDATA[teamwork]]></category>
            <category><![CDATA[code-review]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[remote-working]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Arnau Guadall Godino]]></dc:creator>
            <pubDate>Wed, 03 Jun 2020 12:42:50 GMT</pubDate>
            <atom:updated>2020-06-03T12:42:50.624Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong><em>A quick 4 step guide to handle Code Review while working from home</em></strong></h3><p>Remote work is rapidly on the increase all over the world. Due to the current circumstances surrounding the coronavirus outbreak, this trend is showing no signs of slowing down and has opened a lot of interesting opportunities. Amid stay-at-home orders all over the world, many companies are starting to see the benefits of allowing employees to work from home.</p><p>However, working remotely is not an easy task, and getting used to it can be tricky. Some people need their “going to the office” routine to stay productive, and others find too many distractions at home.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4zIUzAo9gyZJu1XdBUZhyQ.jpeg" /></figure><h3><strong>Four tips for building a positive Code Review culture</strong></h3><p>When working in a <a href="https://www.wework.com/ideas/worklife/distributed-teams">distributed team</a>, developers have to make an extra effort in Code Review. Now more than ever, <strong>communication is key </strong>when you’re giving feedback to a colleague. This kind of exchange is easier in the office. After all, you can leave your desk, find that coworker and discuss any issue face-to-face, instead of leaving a vague comment in the pull request.</p><p>Negative (or ambiguous) feedback can have a huge impact on a colleague’s self-esteem and wellbeing. So what can we do to <strong>reinforce a positive culture and handle feedback in a constructive way</strong>?</p><h3><strong>1. Be specific</strong></h3><p>If you encounter any issue with a teammate’s work, don’t say <strong><em>¡This is wrong!</em></strong>, close the pull request right and continue on what you were doing. Or even worst, <strong>don’t approve a request without even taking a proper look at it</strong>!</p><p>Instead, you should <strong>describe the problem politely and in as much detail as possible</strong>, which will provide the necessary context for the developer to take action.</p><h3><strong>2. Provide alternatives</strong></h3><p>Additionally, it would be extra-nice if you could provide your colleague with an example of an alternative approach. This way, the person receiving the feedback won’t feel like their code is only being critiqued. Take this opportunity to <strong>show your support</strong> for their contribution.</p><blockquote>I would suggest another approach here. What if you avoid mutating the variable? Or you could even return the value directly.</blockquote><blockquote>Could you try the following approach, please?</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qONC-OGgkq6WkR7eoQ_rtQ.jpeg" /></figure><h3><strong>3. Don’t take it personally</strong></h3><p>On the other hand, when we’re the one receiving the Code Review, we must remain humble and <strong>don’t take any comment as a personal attack on our skills</strong>. Also, it’s highly recommended to answer every comment you receive and let your teammate know that you took care of the issue.</p><p>And if you disagree with a colleague’s suggestion, don’t be headstrong and try to explain your reasons for holding your position. You might end up having a nice <strong>conversation</strong>, and other team members might take part in it as well.</p><h3><strong>4. Remember: Face-to-face is still there!</strong></h3><p>When managing “negative” feedback, a smile or some friendly chitchat near the coffee machine can go a long way. However, when these are not an option, video conferencing can be a handy substitute.</p><p>If an issue is hard to explain, or we’re facing a problem that is too complex, setting up a <strong>video conference</strong> is the best approach. With hundreds of tools at our disposal, it’s never been easier to work remotely, whether our teams are in the same city or in different time zones.</p><p><strong>Visual Code</strong> is a personal favorite. This tool provides a real-time collaborative development, such as <a href="https://visualstudio.microsoft.com/services/live-share/">Visual Studio Live Share</a>, for pairing with a coworker.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/840/0*-zcrZ75kFhsqnBjW.gif" /><figcaption><a href="https://visualstudio.microsoft.com/services/live-share/">https://visualstudio.microsoft.com/services/live-share/</a></figcaption></figure><p>Do you have any additional tips or ideas on giving feedback remotely? Let me know in the comments!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=371d96b2c82d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/strands-tech-corner/how-to-give-effective-feedback-to-a-remote-team-of-developers-371d96b2c82d">How to Give Effective Feedback to a Remote Team of Developers</a> was originally published in <a href="https://medium.com/strands-tech-corner">Strands Tech Corner</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>