<?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 Michael Garski on Medium]]></title>
        <description><![CDATA[Stories by Michael Garski on Medium]]></description>
        <link>https://medium.com/@mgarski?source=rss-4e3f858f0e54------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*wtg7AYJArWAhAfVZec3I7w.jpeg</url>
            <title>Stories by Michael Garski on Medium</title>
            <link>https://medium.com/@mgarski?source=rss-4e3f858f0e54------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 02:55:04 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@mgarski/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[Passing the Torch]]></title>
            <link>https://medium.com/fender-engineering/passing-the-torch-55e2fbda38d2?source=rss-4e3f858f0e54------2</link>
            <guid isPermaLink="false">https://medium.com/p/55e2fbda38d2</guid>
            <category><![CDATA[leadership]]></category>
            <category><![CDATA[software-engineering]]></category>
            <dc:creator><![CDATA[Michael Garski]]></dc:creator>
            <pubDate>Tue, 23 May 2023 17:29:08 GMT</pubDate>
            <atom:updated>2023-05-23T17:29:08.539Z</atom:updated>
            <content:encoded><![CDATA[<p>Prior to taking on the responsibilities of leading a team at Fender, I worked as a software engineer across a variety of industries — entertainment, social networking, financial institutions and ad-tech. Throughout those years I had gained engineering experience as part of a large team and also being a <a href="https://boblog111.com/">one person show</a>. That wide variety of industries and team sizes taught me quite a bit, including how important it is to make the effort to mentor less experienced engineers. Passing on the lessons I learned and demonstrating the importance of those lessons to others is not just part of my job as a leader, it is key to the success of my team.</p><p>As odd as it sounds, when I was a team of one I learned much more than being part of a larger team. Being responsible for development, testing, deployment and production monitoring taught me lessons I did not learn as part of a larger team where that responsibility was divided and spread across a variety of specialized teams. That hyper-specialization served to focus my effort to dramatically improve the quality of the software I was writing, but from another point of view it actually limited my technical growth with such a narrow focus. Being aware of hour your applications impact other applications and the context in which they operate is critical.</p><p>As an experienced engineer it can be easy to fall into a trap of taking care of issues yourself, as in the short term it can be faster than working with others to share that knowledge. While triaging a production issue is something that is best done as quickly as possible, afterwards it is critical to review what you did with others on the team. Being the only person with knowledge of a given system that is always called on to address issues can be an ego boost, keep in mind that it is not fun to get called about an issue when you are taking some well deserved time off. It’s the ‘hit by a bus’ problem — if you are removed from the equation can the team succeed? If the answer is no you are not fulfilling your responsibilities as a leader.</p><p>As a leader I have the opportunity to observe behavior in engineers that I myself once exhibited. This allows me to help others on the team, passing on my knowledge without them having to learn those lessons the hard way through downtime and firefighting. Lessons I learned that come to mind include:</p><ul><li>Time boxing problems. If you are stumped on an issue after an hour, ask for teammates opinion as it is easy to overlook an obvious issue that you are blind to.</li><li>Observability and instrumentation. This was an important one for me, and I consider it critical to creating quality software. A good question to ask yourself is that if a customer is reporting an issue, do you have enough information to determine what the issue is?</li><li>Documentation, documentation, and documentation. The first time you need to explain a process to another engineer should be your last. Write up the details and refer others to the documentation when they ask in the future. Remember that documentation must continually be updated to ensure it is relevant as systems evolve.</li></ul><p>When in a senior engineering role or when transitioning to leadership it can be tempting to ‘just take care’ of an issue or quickly add a new feature, that does not do anyone else on the team any favors as they just think ‘someone else will take care of that’ and it does not provide them the opportunity to improve their skills. It is significantly more important to pass your knowledge and experience on to others, allowing them to learn and grow, strengthening your team in the process.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=55e2fbda38d2" width="1" height="1" alt=""><hr><p><a href="https://medium.com/fender-engineering/passing-the-torch-55e2fbda38d2">Passing the Torch</a> was originally published in <a href="https://medium.com/fender-engineering">Fender Engineering</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Real Time Lambda Cost Analysis Using Honeycomb]]></title>
            <link>https://medium.com/fender-engineering/real-time-lambda-cost-analysis-using-honeycomb-b4865a8d8fd6?source=rss-4e3f858f0e54------2</link>
            <guid isPermaLink="false">https://medium.com/p/b4865a8d8fd6</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[findevops]]></category>
            <category><![CDATA[observability]]></category>
            <category><![CDATA[serverless]]></category>
            <dc:creator><![CDATA[Michael Garski]]></dc:creator>
            <pubDate>Mon, 29 Apr 2019 16:01:00 GMT</pubDate>
            <atom:updated>2019-04-30T11:49:21.311Z</atom:updated>
            <content:encoded><![CDATA[<p>All of the services that support our web and mobile applications at Fender Digital are built using AWS Lambda. With Lambda’s cost-per-use billing model we have cut the cost of hosting our services by approximately 90%. Lambda functions are billed on the number of requests and the gb-seconds of compute power consumed. The value of gb-seconds is calculated using the memory the function is configured for along with the billed invocation duration in 100 ms increments. For example, a function configured for 512MB that runs for 924 ms is billed at the 1000 ms increment andconsumes 0.5 gb-seconds of compute. While we have been tagging our resources diligently to calculate the cost of each service, the AWS Cost Explorer does not allow us to delve into the configuration of the function and the actual resources it has consumed versus the actual invocation times.</p><p>Log aggregation to the rescue! We aggregate all of the Cloudwatch log groups for our Lambda functions into a single Kinesis stream, which then parses out the structured JSON logs and publishes them to <a href="http://honeycomb.io/">honeycomb.io</a>. I cannot recommend that tool highly enough for analyzing log data. It is a great product from a great group of people. AWS adds its own log lines as well, including when the function starts an invocation, when the invocation ends, and a report of the invocation that can be used to calculate the cost of the invocation. Here is an example of a report line:</p><pre>REPORT RequestId: 4af5ccd9-fef7–11e8–8de1-bfd74775c3f5 Duration: 38.07 ms Billed Duration: 100 ms Memory Size: 128 MB Max Memory Used: 32 MB</pre><p>Lots of good information in there, we just need to tease it out with a regular expression. The one we use with golang is:</p><pre>`REPORT RequestId: ([0-9a-fA-F]{8}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{12})\s{1,}Duration: (\d{1,}.\d{1,}) ms\s{1,}Billed Duration: (\d{1,}) ms\s{1,}Memory Size: (\d{1,}) MB\s{1,}Max Memory Used: (\d{1,}) MB`</pre><p>This extracts the following from the report line:</p><ul><li>Request ID</li><li>Invocation duration in ms</li><li>Billed duration in ms</li><li>Memory size configured in mb</li><li>Maximum memory used in mb</li></ul><p>The Cloudwatch log entry contains the account id, function name, &amp; invocation time.</p><p>Using the values of billed duration and configured memory size, we can calculate the gb-seconds consumed by the function. We then package up an event to publish to Honeycomb.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/207355e6a1de7b47592461e7233edb4b/href">https://medium.com/media/207355e6a1de7b47592461e7233edb4b/href</a></iframe><p>You’ll notice that we send the duration_ms field as a string. Honeycomb allows us to update the schema to use that value as a float when performing calculations. We’ve also defined the billed_duration_ms field in the Honeycomb schema as an integer so we can order by it.</p><p>Now that we have data in Honeycomb, let’s query it to see the functions that consumed the most compute power over a three day span:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7vza4kK8isjiX7IG9nAVIg.png" /><figcaption>Top 10 Lambda Compute Consumers</figcaption></figure><p>The function that cost us the most during this time was use1-prod-subscriptions_lambdas-appstore_poller. That function is triggered off of a DynamoDB stream TTL record expiration, which signals the stream function to check the current state of an in-app purchase receipt from Apple or Google. We need to poll for the receipt state to determine which users have disabled auto-renew on their subscriptions as that event is not sent to us via the server-to-server app store events. This allows us to target win-back campaigns to students that do not want to continue their subscription.</p><p>Let’s dig deeper into that function to see the average actual elapsed time per 100 ms billing increment…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gnibfc6JzmsHQeJsQV3x0A.png" /><figcaption>Breakdown of a Single Function by Billing Increment</figcaption></figure><p>Now we can see that roughly 2/3 of our cost is on the invocations in the 100–300 ms billed duration. Let’s check out the heatmap for the actual invocation duration of those billing increments.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0G-y7Qsdb0ia38x44KtdKQ.png" /><figcaption>Heatmap of Invocation Duration, 100–300 ms Billed Duration</figcaption></figure><p>From the heatmap that covers the full range of 100–300 ms billed increments, the vast majority complete an invocation in under 10 ms. Lets break down each of those billing durations to see the distribution in each increment.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gw26tH1pxjxoZYHaRve95w.png" /><figcaption>Heatmap of Invocation Duration, 100 ms Billed Duration</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AeF6fgmFtfySM1h3bsaT8A.png" /><figcaption>Heatmap of Invocation Duration, 200 ms Billed Duration</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pFCKjZl2XWsuGRJRpHI_Zw.png" /><figcaption>Heatmap of Invocation Duration, 300 ms Billed Duration</figcaption></figure><p>The function is currently configured for 512 MB, and since most of the time it spends is in network I/O on calling app store APIs, we can reduce the configured memory. If we were to reduce it to 384 MB we would see an ~25% reduction in cost. The average invocation time may be slightly higher, but as this function is invoked off of a DynamoDB stream it has no direct impact on user experience. What are the actual costs incurred? Assuming we’ve already consumed the free tier for Lambda, during the 3 day period we are looking at there were 1,405,640 requests x $0.0000002 per request = $0.28 and 140,057.8 gb-seconds of compute time x $0.00001667 = $2.33. For those three days, this function cost $2.61, leading to a potential savings of $0.65. That’s not a lot, but as our use of lambda steadily grows we can ensure we are not over-provisioned.</p><h3>What’s Next?</h3><p>We do have an enhancement to make to the report log analysis. Currently we are not processing the log line when a function times out:</p><pre>2019–04–18T18:50:54.807Z ddca0e63–91ce-4fa1-a61f-a73f96925b3b Task timed out after 6.01 seconds</pre><p>We have middleware on our function that will capture a timeout before AWS kills the invocation, but to be complete it would be best to record the timeout in case we have a failure in our middleware.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b4865a8d8fd6" width="1" height="1" alt=""><hr><p><a href="https://medium.com/fender-engineering/real-time-lambda-cost-analysis-using-honeycomb-b4865a8d8fd6">Real Time Lambda Cost Analysis Using Honeycomb</a> was originally published in <a href="https://medium.com/fender-engineering">Fender Engineering</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[TBT: The CUBE at Serverlessconf]]></title>
            <link>https://medium.com/fender-engineering/tbt-the-cube-at-serverlessconf-a83ed7e78efc?source=rss-4e3f858f0e54------2</link>
            <guid isPermaLink="false">https://medium.com/p/a83ed7e78efc</guid>
            <category><![CDATA[aws-lambda]]></category>
            <category><![CDATA[serverless-architecture]]></category>
            <category><![CDATA[serverless]]></category>
            <category><![CDATA[serverlessconf]]></category>
            <dc:creator><![CDATA[Michael Garski]]></dc:creator>
            <pubDate>Thu, 18 Apr 2019 16:01:00 GMT</pubDate>
            <atom:updated>2019-04-18T16:01:00.879Z</atom:updated>
            <content:encoded><![CDATA[<p>While I was at Serverlessconf San Francisco in July of 2018, I had a chance to sit down with <a href="http://siliconangle.tv/stu-miniman/">Stu Minnamin of theCUBE</a> to talk about how Fender is using Serverless to implement the APIs for our web and mobile applications.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FilvUQP8BCbc%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DilvUQP8BCbc&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FilvUQP8BCbc%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/090989f90d5702f3fc47b7f405ac61ce/href">https://medium.com/media/090989f90d5702f3fc47b7f405ac61ce/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a83ed7e78efc" width="1" height="1" alt=""><hr><p><a href="https://medium.com/fender-engineering/tbt-the-cube-at-serverlessconf-a83ed7e78efc">TBT: The CUBE at Serverlessconf</a> was originally published in <a href="https://medium.com/fender-engineering">Fender Engineering</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[TBT: Serverlessconf San Francisco 2018]]></title>
            <link>https://medium.com/fender-engineering/tbt-serverlessconf-san-francisco-2018-600f49f5bbe6?source=rss-4e3f858f0e54------2</link>
            <guid isPermaLink="false">https://medium.com/p/600f49f5bbe6</guid>
            <category><![CDATA[aws-lambda]]></category>
            <category><![CDATA[serverlessconf]]></category>
            <category><![CDATA[serverless]]></category>
            <category><![CDATA[serverless-architecture]]></category>
            <dc:creator><![CDATA[Michael Garski]]></dc:creator>
            <pubDate>Thu, 11 Apr 2019 16:01:00 GMT</pubDate>
            <atom:updated>2019-04-11T16:01:00.872Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/910/1*XEzA_qNXcVWJ8z35QcjpBA.png" /></figure><p>Today’s TBT item is from July 2018, where I spoke at <a href="https://acloud.guru/">A Cloud Guru’s</a> Serverlessconf in San Francisco on what we refer to as Serverless Microservices. I’m not able to embed the video, but you can find it <a href="https://acloud.guru/series/serverlessconf-sf-2018/view/fc2c6f62-a8c1-5365-8d9e-8a72df3fe023">here</a> along with the other videos from the conference.</p><p>Building on the talk at Serverlessconf, I gave a more comprehensive presentaion at the O’Reilly Software Architecture conference in London in October 2018. If you are a Safari Bookshelf subscriber, you can access the video <a href="https://learning.oreilly.com/videos/oreilly-software-architecture/9781492025917/9781492025917-video323659">here</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=600f49f5bbe6" width="1" height="1" alt=""><hr><p><a href="https://medium.com/fender-engineering/tbt-serverlessconf-san-francisco-2018-600f49f5bbe6">TBT: Serverlessconf San Francisco 2018</a> was originally published in <a href="https://medium.com/fender-engineering">Fender Engineering</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[TBT: This Is My Architecture]]></title>
            <link>https://medium.com/fender-engineering/tbt-this-is-my-architecture-96ecb06d50b5?source=rss-4e3f858f0e54------2</link>
            <guid isPermaLink="false">https://medium.com/p/96ecb06d50b5</guid>
            <category><![CDATA[serverless]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[aws-lambda]]></category>
            <category><![CDATA[serverless-architecture]]></category>
            <dc:creator><![CDATA[Michael Garski]]></dc:creator>
            <pubDate>Thu, 04 Apr 2019 16:01:00 GMT</pubDate>
            <atom:updated>2019-04-04T16:01:00.774Z</atom:updated>
            <content:encoded><![CDATA[<p>Our first TBT item is from May 2018, where I was interviewed by Raul Frias of AWS on how Fender uses AWS Lambda and API Gateway to implement the services that support our web and mobile applications.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FRzRVwh_pXN4%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DRzRVwh_pXN4&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FRzRVwh_pXN4%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/842b7833828ee7446181a9e57ae04509/href">https://medium.com/media/842b7833828ee7446181a9e57ae04509/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=96ecb06d50b5" width="1" height="1" alt=""><hr><p><a href="https://medium.com/fender-engineering/tbt-this-is-my-architecture-96ecb06d50b5">TBT: This Is My Architecture</a> was originally published in <a href="https://medium.com/fender-engineering">Fender Engineering</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>