<?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 Mitchell Kossoris on Medium]]></title>
        <description><![CDATA[Stories by Mitchell Kossoris on Medium]]></description>
        <link>https://medium.com/@mitchellkossoris?source=rss-51201b24d7d5------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*GhSfEjWKXRFnUhvDrNSzow.jpeg</url>
            <title>Stories by Mitchell Kossoris on Medium</title>
            <link>https://medium.com/@mitchellkossoris?source=rss-51201b24d7d5------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 16 Nov 2026 20:39:05 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@mitchellkossoris/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[It’s not just MV3 - Chrome’s extension development experience is a problem]]></title>
            <link>https://medium.com/@mitchellkossoris/its-not-just-mv3-chrome-s-extension-development-experience-is-a-problem-e20a7707f760?source=rss-51201b24d7d5------2</link>
            <guid isPermaLink="false">https://medium.com/p/e20a7707f760</guid>
            <category><![CDATA[chrome]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[google]]></category>
            <category><![CDATA[chrome-extension]]></category>
            <category><![CDATA[developer]]></category>
            <dc:creator><![CDATA[Mitchell Kossoris]]></dc:creator>
            <pubDate>Mon, 28 Oct 2024 14:46:32 GMT</pubDate>
            <atom:updated>2024-10-28T14:46:32.387Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dL5eTjV8zKMVJPvCjR-dlw.png" /></figure><p>I remember being excited to release my first Chrome extension in 2018 as a university student after weeks of hard work on it. Pushing that final “Submit for Review” button was satisfying, knowing I’d built this little free product entirely by myself. Little did I know I was about to embark on a five-year journey of frustration through communication issues, sudden policy changes, and takedown threats, ultimately losing trust in the end due to Google’s almost adversarial relationship with me as an extension developer.</p><p>By early 2024, my extension <a href="https://chromewebstore.google.com/detail/synq-for-spotify-youtube/jcdmcpefbebkldopabclefjaggejocff?authuser=0&amp;hl=en">SynQ</a> (formerly YTM+ for YouTube Music) had grown to nearly 40,000 active users. Today, that number is almost half what it used to be, and Chrome’s poor developer relations and experience is primarily to blame. This isn’t just another story about Chrome’s Manifest V3 (MV3) update — though that plays its part. This is a cautionary tale about the broader challenges of building on Chrome’s extension platform, told through my firsthand experience as a developer who watched their user base erode through a death by a thousand cuts.</p><p>Before we dive in, I’ll plant the story’s seed with this one graph of SynQ’s weekly active users. Every major dip you see is due to some problem I encountered with Chrome’s extension practices, culminating in the final blow to SynQ on its first day of release in March of 2024.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*k2kpRm4_yreDcQgkyx8_RA.png" /></figure><blockquote>To anyone at Google reading this: I appreciate what Chrome has done for the web, and I think the extension marketplace is a brilliant idea. I simply want you to consider improving the experience and communication for developers so it’s not so painful to work with you.</blockquote><h3>The First Dominos Fall</h3><p>It began in April 2021 — I received my first takedown notice. All had been fairly quiet for years leading up to this first experience, when Google suddenly required an external privacy policy for extensions. Sounds simple enough, right? Wrong. I received no warning, just a take down notice that YTM+ had been removed from the Chrome Web Store, and since I happened to miss that one email, YTM+ was simply unlisted for nearly a month. It had been years since I actively worked on YTM+, so it wasn’t top-of-mind to be checking the listing page, as I’d never really had a problem before. I admit this part was my mistake for not being active at this time, but immediately removing the listing without a warning email was pretty shocking.</p><p>Upon realizing what happened, I discovered the email. I quickly purchased a domain name, whipped together a privacy policy, and hosted it. I linked it in my store listing and submitted the update, only to be rejected. Why? Neither the original email notice nor the extension submission form mentioned that the privacy policy needed to be linked to the developer profile (a strange choice since one developer could have different privacy policies for each of their extensions) rather than included in the extension listing. This poor communication and game of guess-the-requirements cost me 10% of my users.</p><h3>The Permission Paradox</h3><p>November 2021 marked what I thought would be an exciting update — adding a feature for Spotify-to-YouTube Music link conversion. Instead, it became a lesson in how Chrome’s permission system can devastate an extension’s user base. As I was adding a new domain (Spotify) to the extension’s control, I had to declare new permissions in the extension.</p><p>What I didn’t know at the time of submission was that adding new permissions would automatically disable the extension for every single existing user. There was no way to test this behavior beforehand. No warning in the developer dashboard. Just thousands of users suddenly seeing a scary permission warning with no context about why these changes were necessary.</p><p>I’d added new permissions before and had no issue because not every permission change results in this behavior. It is beyond reason that decades in, Chrome still gives no warning to the developer when their entire user base will have their extension disabled when certain new permissions are added.</p><p>The result? Another 20% of my user base vanished overnight.</p><h3>The Kafka-esque Support Experience</h3><p>By mid-2023, I received an email that perfectly encapsulated the sometimes-careless nature of Chrome’s extension review process. The message warned that my extension would be shut down in 14 days because “The functionality provided in the description is not working.”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fgjyGQlK8MN5tBwLsJwCyg.png" /></figure><p>Which functionality? They didn’t say. After filing an appeal, I learned they thought my Spotify integration was broken because “songs are not being played but asking to redirect to the YTM music website.”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/996/1*tJFUG-JfAt8E_4mNa8ACBw.png" /></figure><p>Here’s the kicker: That was exactly what the feature was supposed to do, as clearly stated in the description:</p><blockquote>Hate it when your friends send you a Spotify link and you have to go search for it on YouTube Music? YTM+ will automatically search for the YTM version and give you a quick popup to go straight to it!</blockquote><p>After I pointed this out, they simply responded with “Thank you for making the required changes” — though I hadn’t changed anything.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UVQp5G0VXGni2rma3T1dug.png" /></figure><h3>The Final Blow</h3><p>The story culminates in March 2024, with what should have been a celebratory moment — the release of YTM+ as SynQ, supporting 3 new music services and introducing music service interoperability on the web, completely rebuilt from the ground up for MV3 compliance. I had spent months ensuring everything worked perfectly, including clever use of an API I had discovered in YouTube Music’s DOM that <a href="https://github.com/SynQApp/Extension/blob/c355167e494b828d82a822fb66a1c07cfe819205/src/services/youtube-music/YouTubeMusicPlaybackController.ts#L295-L304">gave me transparent access to their application state/store</a>, increasing reliability compared to YTM+.</p><p>The review process took unusually long — 3–4 days instead of the usual &lt;12 hours. When approval finally completed and the extension was published, something strange happened: <strong>the YouTube Music API I had been using for months suddenly vanished from their DOM</strong>. Given that Chrome and YouTube Music share the same parent company, the timing seemed far from coincidental. It seems more likely that the source code I had to submit for approval was reviewed by someone on the Chrome team, and that team member flagged it for review by the YouTube Music team, who then removed the API altogether.</p><p>The result was that SynQ released as a completely broken update for all of YTM+’s existing users. On top of that, despite my best efforts to avoid the same permissions problems by declaring them as optional and adding an onboarding process for SynQ to accept these permissions with contextual descriptions of why they were needed, the extension was disabled anyway.</p><p>The consequences were severe. Users were confronted with an unfamiliar rebranded extension requesting new permissions without context, only to find it broken if they did accept. It took five days for Chrome to approve my emergency fix for which I had tried to request an expedited review. By the time the dust settled 5 months later, 40% of my users were gone, my review score had plummeted, and my search rankings had tanked.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4TFbC98p6iFdPJFudfxebw.png" /></figure><p><strong>Today, 7 months after release, SynQ still has just 23k users compared to YTM+’s 39k prior to the update, and new installations remain stunted.</strong></p><h3>Beyond MV3</h3><p>While much has been written about MV3’s impact on extensions like uBlock Origin (check out <a href="https://www.youtube.com/watch?v=D9meVUnrqz4">Theo Browne’s video on this topic</a>), the problems with Chrome’s extension platform run much deeper. The lack of clear communication, the absence of proper testing tools, the seemingly arbitrary policy enforcement, and the potential for internal conflicts of interest all create an environment where building and maintaining a successful extension feels like walking through a minefield.</p><p>And remember, this was for a free, no-monetization, no-data-collection extension designed to improve Google’s users’ experience, both on Chrome and on YouTube Music. It’s an extension that had maintained strong standing with Google and with its users for years.</p><p>For developers considering developing extensions for Chrome, this isn’t meant to discourage you. Rather, it’s a call for awareness — and more importantly a call to Google to consider how they might better support the developer community that has helped make Chrome’s extension ecosystem so valuable.</p><p>As for me? I’m still here, still maintaining SynQ, still trying to provide value to my remaining users. But I can’t help but wonder how many other developers have similar stories to tell, and how many innovative extensions we’ve lost to this challenging landscape.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e20a7707f760" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Vercel Just Changed its Pricing —How Does it Compare?]]></title>
            <link>https://medium.com/@mitchellkossoris/vercel-just-changed-its-pricing-how-does-it-compare-195adab23b3c?source=rss-51201b24d7d5------2</link>
            <guid isPermaLink="false">https://medium.com/p/195adab23b3c</guid>
            <category><![CDATA[react]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[nextjs]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <dc:creator><![CDATA[Mitchell Kossoris]]></dc:creator>
            <pubDate>Fri, 05 Apr 2024 13:02:51 GMT</pubDate>
            <atom:updated>2024-04-05T13:02:51.944Z</atom:updated>
            <content:encoded><![CDATA[<h4>The popular NextJS frontend infrastructure service has historically been criticized for its high cost.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*2oQzaX5ZHquOqIpLNdUEXw.png" /></figure><p>Vercel is the company behind NextJS, a widely popular free and open-source software (FOSS) framework for developing production-ready React applications with <a href="https://github.com/vercel/next.js">120k stars on GitHub</a>. In fact, NextJS is the recommended solution for starting a project by the React team in their <a href="https://react.dev/learn/start-a-new-react-project">docs website</a>.</p><p>In addition to the FOSS NextJS project, Vercel offers free and paid infrastructure-as-a-service (IaaS) options for deploying NextJS projects. The service is enjoyed by many developers for its convenience, simplicity, and many features that remove the complexity around getting a project up and running. Compared to more barebones options for deploying web applications like AWS EC2, Vercel is much more abstracted, requiring only a few clicks to get a NextJS project deployed and serving users.</p><p>However, Vercel has consistently been criticized for its pricing model. While the Hobby and Pro tiers are relatively inexpensive at a small scale, pricing increases dramatically after the initial included units are consumed.</p><h3>Key Changes</h3><p>Starting June 25, 2024, Vercel will break pricing down into more incremental units, enabling developers to better optimize their applications for cost.</p><h4>Bandwidth</h4><p>The major pain point with Vercel’s pricing has historically been its high bandwidth cost. Bandwidth is the amount of data transferred between and out of Vercel’s servers. For example, if your landing page contained many images or other static files, this cost could add up quickly.</p><p><strong>Currently</strong>, the Pro tier is $20/user/mo and includes a fairly generous 1TB of bandwidth, but after that it becomes $40/100GB, or in other words $400/TB.</p><p><strong>After the changes</strong>, the Pro tier will remain $20/user/mo, but the Bandwidth cost will be broken down into the following metrics and consumption costs <strong>for most regions</strong> (check regional pricing here: <a href="https://vercel.com/docs/pricing#regional-pricing">https://vercel.com/docs/pricing#regional-pricing</a>):</p><ul><li><strong>Outbound data transfer</strong> (from Vercel to users): 1TB included, $0.15/GB after threshold (or $150/TB)</li><li><strong>Origin data transfer</strong> (from Vercel Functions to Vercel Edge Network, primarily on cache misses and API routes): 100GB/mo included, $0.06/GB after threshold (or $60/TB)</li><li><strong>Edge requests</strong> (number of requests): 10M/mo included, $2.00/million after threshold</li><li><strong>Incremental static regeneration</strong>: Nothing included, $0.40/million cache reads and $4.00/million cache writes</li></ul><p>In addition, rather than being charged per 100GB, you are now charged per 1GB. This means you’re have a more accurate and exclusively lower or equivalent cost (i.e. if you use 105GB, you’ll be charged for 105GB rather than for 200GB).</p><h4>Functions</h4><p>In addition to Bandwidth pricing changes, they have also changed Function pricing, which is primarily used for performing rendering options for edge network cache misses and ISR renders as well as API routes.</p><p><strong>Currently</strong>, the Pro tier includes 1,000 GB-hours of compute and 1 million invocations, with a cost of $0.40/GB-hour for additional usage.</p><p><strong>After the changes</strong>, the Pro tier Functions cost will be broken down in the following metrics and consumption costs:</p><ul><li><strong>Invocations</strong>: 1M/mo included, $2.00/million after threshold</li><li><strong>Compute</strong>: 1,000GB-hours/mo included, $0.18/GB-hour after threshold</li></ul><h4>Free Tier</h4><p>Vercel said in their announcement that there will be no changes to the Hobby/Free Tier, saying:</p><blockquote>While making our infrastructure metrics more granular, we have kept an equivalent of the previous free tier included usage. For example, 100GB of Bandwidth is now 100GB of Fast Data Transfer, 10GB of Fast Origin Transfer, and 1 million Edge Requests.</blockquote><h3>Evaluation</h3><p>The main question on most people’s minds with this announcement is “how will this affect my project’s bill?” Vercel had this to say about changes to existing project cost:</p><blockquote>For the majority of Pro customers, monthly bills will <strong>stay the same or go down</strong>. Emails with next steps for your account will be sent to account owners.</blockquote><p>Looking at the pricing myself, I would generally agree with this statement as the primary drivers of cost for current projects appear to have been slashed fairly significantly. However, it will depend on specific applications, as some applications may have been built to maximize usage with the more abstracted metrics, and these new granular metrics may no longer let them do that. So far, we’ve seen some of the mentioned emails from customers that have shown both increases and decreases, sometimes dramatic in either direction.</p><p>For example, this user saw their expected monthly bill decrease by 22% from $242 to $188:</p><iframe src="https://cdn.embedly.com/widgets/media.html?type=text%2Fhtml&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;schema=twitter&amp;url=https%3A//twitter.com/skr_elbo/status/1776012800168722509&amp;image=" width="500" height="281" frameborder="0" scrolling="no"><a href="https://medium.com/media/e080f59dba1877aa7409019a54e5f404/href">https://medium.com/media/e080f59dba1877aa7409019a54e5f404/href</a></iframe><p>On the other hand, this user found their expected bill going from the simple $20/mo Pro monthly fee to 10x that at $201/mo:</p><h3>James Potter on Twitter: &quot;Wow @vercel this is *terrible* comms. What an interesting way to frame &quot;hi we are increasing your bill by 10x&quot; pic.twitter.com/E3NY9b0pdy / Twitter&quot;</h3><p>Wow @vercel this is *terrible* comms. What an interesting way to frame &quot;hi we are increasing your bill by 10x&quot; pic.twitter.com/E3NY9b0pdy</p><h3>Cost Optimization</h3><p>Speculating here, the most likely reasons I could see for high cost after the pricing changes are high usage of ISR (which can hopefully be optimized) or high request count (meaning these projects were less affected by bandwidth before). Vercel has included some tips on optimizing projects for these new metrics, which can be seen here:</p><ul><li><strong>Networking</strong> (Data Transfer and Edge Requests): <a href="https://vercel.com/docs/pricing/networking#fast-data-transfer">https://vercel.com/docs/pricing/networking</a></li><li><strong>Functions</strong>: <a href="https://vercel.com/docs/pricing/serverless-functions">https://vercel.com/docs/pricing/serverless-functions</a></li><li><strong>ISR Data Cache</strong>: <a href="https://vercel.com/docs/pricing/data-cache">https://vercel.com/docs/pricing/data-cache</a></li></ul><p>Additionally, Vercel is offering an additional 3 months of time for optimization for projects that are seeing an increase in cost via a “100% discount on new metrics (Fast Origin Transfer and Edge Requests).”</p><p>I am hoping to see more detailed guides from both Vercel and the community on optimizing projects for the new costs prior to the pricing changes going into effect. Ideally Vercel would also include a calculator/cost estimatorthat can be evaluated on current projects to check what pricing might look like after tweaking projects to optimize these metrics.</p><h3>Alternatives (Least to Most Expensive)</h3><h4>Vercel vs AWS (OpenNext)</h4><p>The least expensive alternative is to just use the infrastructure under Vercel’s hood, and Vercel primarily uses AWS serverless technologies to power its infrastructure. Using AWS for NextJS with the same serverless scalability Vercel provides isn’t trivial, as Vercel incorporates additional build steps beyond what’s included in the open-source NextJS project. However, we can get close to Vercel’s functionality with SST’s OpenNext project, which deploys to AWS Lambda, CloudFront, and other AWS services.</p><p><strong>Pricing</strong></p><ul><li><strong>Subscription cost</strong>: $0/mo</li><li><strong>Outbound data transfer</strong> (from AWS CloudFront to users): 1TB/mo included, $0.085/GB (or $85/TB) after threshold and decreasing incrementally to as low as $0.025/GB for petabyte-scale application</li><li><strong>Origin data transfer</strong> (from CloudFront to AWS Lambda, especially for POST, PUT, etc. — note that AWS Lambda to CloudFront is free): None included, $0.02/GB</li><li><strong>Edge requests</strong> (number of CloudFront requests): 10M/mo included + 20k/mo cache misses included, $1.00/million requests after threshold + $0.40/million cache misses for S3 GET requests</li><li><strong>Incremental static regeneration</strong>: Nothing included, no easy way to quantify this but check out the architecture here: <a href="https://open-next.js.org/inner_workings/architecture">https://open-next.js.org/inner_workings/architecture</a></li><li><strong>Function Invocations</strong>: 1M/mo included, $0.20/million after threshold</li><li><strong>Function Compute</strong>: 888GB-hours/mo included, $0.06/GB-hour after threshold</li><li><strong>Additional</strong>: It’s hard to get all AWS costs included as it will depend a lot on your specific application and Vercel abstracts a lot of functionality, so you should assume some additional margin for application costs such as certificates, hosted zones, WAF, etc. Additionally, this does not account for deployment costs, which include CI/CD, build processes, cache invalidations, etc., so you’ll have to factor for this as well.</li></ul><p><strong>Limitations</strong></p><ul><li>Lacks support for App router</li><li>No developer tooling</li><li>Cloud-based deployment pipeline/process not included</li><li>Integrations to Git providers not included</li><li>Deployment previews not supported</li><li>Monitoring not included</li><li>WAF not included</li></ul><h4>Vercel vs Cloudflare Pages + Workers</h4><p>Cloudflare is a very widely used CDN and firewall that also has hosting options for NextJS applications.</p><p><strong>Pricing</strong></p><ul><li><strong>Subscription cost</strong>: $5–30/mo (depending on Pages tier)</li><li><strong>Outbound data transfer</strong> (from AWS CloudFront to users): Free</li><li><strong>Origin data transfer</strong> (from Cloudflare services to other Cloudflare services): Free</li><li><strong>Edge requests</strong> (number of CloudFront): Free</li><li><strong>Incremental static regeneration</strong>: Not supported by CloudFlare</li><li><strong>Function Invocations</strong>: 1M/mo included, $0.15/million after threshold</li><li><strong>Function Compute</strong>: 111GB-hours/mo included, $0.45/GB-hour after threshold</li><li><strong>Data Storage </strong>(static files and ISR cache): $0.023/GB per month</li></ul><p><strong>Limitations</strong></p><ul><li>Incremental static regeneration (ISR) not supported</li><li>Only supports edge runtime, which may come with incompatibilities with certain Node APIs</li></ul><h4>Vercel vs AWS (Amplify)</h4><p>AWS also directly offers a more managed approach with their frontend infrastructure service and framework called Amplify. This would be a simpler and more supported approach to deploying NextJS on Amplify.</p><p><strong>Pricing</strong></p><ul><li><strong>Subscription cost</strong>: $0/mo</li><li><strong>Outbound data transfer</strong> (from AWS Amplify to users): Nothing included, $0.15/GB (or $150/TB)</li><li><strong>Origin data transfer</strong> (from AWS services to other AWS services): Free</li><li><strong>Edge requests</strong> (number of requests): Free</li><li><strong>Incremental static regeneration</strong>: Not quantified by this metric</li><li><strong>Function Invocations</strong>: Nothing included, $0.30/million after threshold</li><li><strong>Function Compute</strong>: Nothing included, $0.20/GB-hour after threshold</li><li><strong>Data Storage </strong>(static files and ISR cache): $0.023/GB per month</li><li><strong>Build and Deploy</strong>: $0.01/minute</li></ul><p><strong>Limitations</strong></p><ul><li>Edge API routes (including Edge middleware) not supported</li><li>On-demand incremental static regeneration (ISR) not supported</li><li>Internationalized (i18n) automatic locale detection not supported</li><li>Next.js streaming not supported</li></ul><h4>Vercel vs Netlify</h4><p>Finally, Netlify is another popular frontend infrastructure solution that offers good support for NextJS applications.</p><p><strong>Pricing</strong></p><ul><li><strong>Outbound data transfer</strong> (from Netlify to users): 1TB included, $0.55/GB after threshold (or $550/TB)</li><li><strong>Origin data transfer</strong> (from Netlify services to other Netlify services): Free</li><li><strong>Edge requests</strong> (number of requests): Free</li><li><strong>Incremental static regeneration</strong>: No easy way to quantify this but check out their docs here on how it works: <a href="https://docs.netlify.com/frameworks/next-js/runtime-v4/incremental-static-regeneration/">https://docs.netlify.com/frameworks/next-js/runtime-v4/incremental-static-regeneration/</a></li><li><strong>Invocations + Compute</strong>: 125k requests/mo + 100 hours compute included, then $25 for next 1,875,000 requests + 900 hours, then increments of 500k requests + 500 hours for $19/increment</li></ul><p><strong>Limitations</strong></p><ul><li>SSR pages set to the edge runtime will run in your <a href="https://docs.netlify.com/functions/optional-configuration/#region">functions region</a></li><li>Rewrites in your Next.js configuration can’t point to static files in the public directory</li><li>Next.js features that are marked as unstable or experimental may not be supported</li><li>next/image images do not work on Netlify</li></ul><h3>Conclusion</h3><p>Vercel’s pricing changes seem like a win for the majority of developers. It has been a long-time pain point for many considering using Vercel. Many developers are skeptical due to some of the increases we’re seeing, though with proper optimization, those increases may not be so dramatic. All of this being said, alternative options have continued to develop their support for NextJS features, with many offering cheaper options depending on the level of convenience and feature support developers are looking for. While Vercel continues to be the most convenience option for deploying NextJS apps, the other options have become very compelling in the last year or two and should be considered for their cost-benefit tradeoffs.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=195adab23b3c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Evaluating a Move: The Cost of Living vs Income Fallacy]]></title>
            <link>https://medium.com/@mitchellkossoris/evaluating-a-move-the-cost-of-living-vs-income-fallacy-4998d30c82c9?source=rss-51201b24d7d5------2</link>
            <guid isPermaLink="false">https://medium.com/p/4998d30c82c9</guid>
            <category><![CDATA[tech]]></category>
            <category><![CDATA[cost-of-living]]></category>
            <category><![CDATA[jobs]]></category>
            <category><![CDATA[income]]></category>
            <category><![CDATA[moving]]></category>
            <dc:creator><![CDATA[Mitchell Kossoris]]></dc:creator>
            <pubDate>Mon, 15 Jan 2024 16:02:18 GMT</pubDate>
            <atom:updated>2024-01-15T16:02:18.867Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CX4JHMryi8g_2jd_5USUXw.png" /></figure><p>This is just a quick post about a common misconception I’ve heard even from very smart people in my industry when they are considering whether a move to a different city is worth it.</p><h4>The Misconception</h4><p>The thought process goes something like this:</p><blockquote>If I get a job in City A, my salary will <strong>increase by 50%</strong> compared to where I live in City B, but it doesn’t matter because City A is <strong>also 50% more </strong>than City B.</blockquote><p>At first glance, it makes intuitive sense. You multiplied both by 1.5x, therefore it cancels out. However, when you take a step back and really think about it, you’ll see a major flaw in this logic, and one that has likely slowed the financial goals of many.</p><h4>The Math</h4><p>What we’re talking about are two simple numbers. The first is your <strong>cost of living</strong>, which is the totality of all of your reasonably-expected expenses, such as rent/mortgage, food, insurance, etc. The second is your <strong>total income</strong>, including salary, bonus, stocks, etc.</p><p>However, the number we truly care about is the difference between income and cost of living — otherwise know as your <strong>expendable income</strong>.</p><p>Expendable income is the money that powers both your day-to-day lifestyle and your future financial goals, making it the most important number to consider when comparing the financial effects of living in two different cities with different incomes and costs.</p><p>So what’s the flaw in the original logic? Well, if you were to increase your income and your cost of living by the same factor, <strong>you would also increase your expendable income by that same factor</strong>.</p><h4>An Example</h4><p>Let’s take a look at an example to illustrate this. Say you currently live in Asheville, NC and there’s a job that interests you in Seattle, WA. Let’s also say that your current annual costs in Asheville amount to <strong>$50k</strong> and your income is <strong>$120k</strong>. Looking at CNN Money’s <a href="https://money.cnn.com/calculator/pf/cost-of-living/index.html">cost of living calculator</a>, Seattle’s cost of living is <strong>51%</strong> higher than Asheville. So, it will cost you about $76k to live in Seattle with the same lifestyle. If we also apply that same 51% increase to the income, you’ll be at <strong>$181k</strong>.</p><p>But remember what I said before about how we actually care about the difference in income vs cost of living. The expendable income previously was <strong>$120k — $50k = $70k</strong>. In Seattle, though, it would be <strong>$181k — $76k = $105k</strong>. That means you now have an <strong>additional $35k</strong> to put into savings or spend however you’d like.</p><h4>Conclusion</h4><p>This is obviously simple math but it’s easy to think about in the wrong way nonetheless. If you are considering moving to a higher CoL area, try running the actual numbers and really pay attention to that expendable income. Increasing that is what gets you closer to your financial goals, be it the ability to spend more now or to save more for later.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4998d30c82c9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Serverless Bun vs Node: Benchmarking on AWS Lambda]]></title>
            <link>https://medium.com/@mitchellkossoris/serverless-bun-vs-node-benchmarking-on-aws-lambda-ecd4fe7c2fc2?source=rss-51201b24d7d5------2</link>
            <guid isPermaLink="false">https://medium.com/p/ecd4fe7c2fc2</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[serverless]]></category>
            <dc:creator><![CDATA[Mitchell Kossoris]]></dc:creator>
            <pubDate>Mon, 11 Sep 2023 13:32:32 GMT</pubDate>
            <atom:updated>2023-09-11T18:32:02.117Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*r5Zf59YOaXgufI9Zyk5kmQ.png" /></figure><p>Since the inception of server environments for JavaScript, NodeJS has reigned supreme as the go-to runtime. Node, along with its package manager, NPM, is now used extensively for projects ranging from small hobbyist side projects to enterprise-grade high-traffic systems. Most developers haven’t dared challenge Node due to its default status in the industry and comprehensive ecosystem of open-source development. Deno was the first major contender, but it never quite caught on, likely due to its lack of strong interoperability between Node, open source NPM packages, and CommonJS.</p><p>A few days ago, September 8, 2023, a new challenger, Bun, officially announced a stable release of their runtime and accompanying tooling, including an NPM-compatible package manager, bundler, APIs, and more. <a href="https://bun.sh/blog/bun-v1.0">Bun promises a whole host of benefits</a>, mostly around performance and developer experience, while boasting strong interoperability standards. In other words, Bun looks to be a drop-in replacement for Node-based applications that improves everything about the experience of developing JS applications and their performance.</p><p>As someone who works primarily on serverless function-based applications, my immediate question was: <em>this all sounds great, but can I actually use this? </em>I especially wondered this because Lambda has optimized their service for NodeJS, so how would Bun fair when it has no official support?<em> </em>To find out, I devised a set of benchmarks to test it out with the aim of answering my question.</p><h3>The Tests</h3><p>Running generic benchmark tests has limitations for comparing between runtimes and languages and therefore cannot substitute for testing your specific use cases. That said, I tried to focus on a few key areas I thought would be of interest to developers in the context of running JavaScript in a serverless function environment. I came up with the following three benchmark tests that consider theoretical, real-world, and serverless-specific aspects:</p><h4>General processing performance</h4><p>Bun claims it can process logic at 3–4x the speed of NodeJS. While many applications may be more I/O-bound (database queries, network calls, file system reads/writes, etc), this type of general improvement, if accurate, helps every system, and especially those with CPU-bound and memory-bound workloads. As such, I wanted to see if Bun’s pure performance claims would translate to a serverless environment.</p><p><strong>Test: Generate and then sort (with built-in Array.sort) 100K random numbers 10 times back-to-back.</strong></p><h4>CRUD API</h4><p>Testing CPU-heavy workloads is interesting, but it is likely to inflate the real-world benefits of Bun, as the reality is that Lambda-like environments are very frequently used for much simpler applications that are more I/O-bound (network, file system, etc). A very common pattern is to use API Gateway, Lambda, and DynamoDB together to create simple CRUD APIs where the computations are simple. I wanted to test these more real-world scenarios to see whether Bun can still provide benefit even in the absence of heavy CPU-bound logic.</p><p><strong>Test: Implement a CRUD Update function that validates input, retrieves an object from DynamoDB, shallow merges the requested modifications into the existing object, and puts it back in DynamoDB.</strong></p><h4>Cold start times</h4><p>Serverless functions tend to suffer from what’s known as the “cold-start” issue. AWS Lambda functions run in a containerized environment, with each container typically lasting between 10–30 minutes. When a request comes in and no container is spun up and available, Lambda will spin up a new container to handle the request, and that spin up time is the cold start time we’re referring to. Officially-supported runtimes like NodeJS will typically be more optimized to spin up quickly, so the major question to answer is how will Bun, an unoptimized runtime, compare?</p><p><strong>Test: Hello world function with intentionally-induced cold starts.</strong></p><h3>Environment Configuration</h3><p>The following configuration was used for these tests:</p><ul><li>REST API Gateway-to-Lambda Function (response times measured from API Gateway to get full end-to-end scope)</li><li>1024MB memory for Lambda Functions</li><li>x86_64 architecture on Amazon Linux 2 for Bun</li><li>Base runtime configuration on x86_64 architecture for Node.js 18.x</li><li>Provisioned concurrency of 5 (except for the cold-start test)</li></ul><h3>General Processing Test Results</h3><p><em>This test was run 1,000 times for each runtime, with response time data gathered server-side and collected in CloudWatch and X-Ray.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/994/1*oYNawQNCtNizFK0KPLAi-A.png" /><figcaption>API Gateway response time stats for Node vs Bun compute test, from CloudWatch.</figcaption></figure><h4>Node</h4><ul><li><strong>Median Response Time: 3736ms</strong></li><li>Min Response Time: 3391ms</li><li>Max Response Time: 4580ms</li><li>p95 Response Time: 3989ms</li><li>p99 Response Time: 4404ms</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Cbev17f_xnutjjG2I5YFzg.png" /><figcaption>Response time distribution for Node runtime compute test, from X-Ray.</figcaption></figure><h4>Bun</h4><ul><li><strong>Median Response Time: 1836ms</strong> <strong>(-50.9%)</strong></li><li>Min Response Time: 1564ms (-53.9%)</li><li>Max Response Time: 3571ms (-22.0%)</li><li>p95 Response Time: 2027ms (-49.2%)</li><li>p99 Response Time: 2117ms (-51.9%)</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*v2aNS-YXkqOOxbcEaIAtPg.png" /><figcaption>Response time distribution for Bun runtime compute test, from X-Ray.</figcaption></figure><h3>CRUD API Test Results</h3><p><em>This test was run 1,000 times for each runtime, with response time data gathered server-side and collected in CloudWatch and X-Ray.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/971/1*r2yM0q7sZwH73_CzMJmelQ.png" /><figcaption>API Gateway response time stats for Node vs Bun simple CRUD API test, from CloudWatch.</figcaption></figure><h4>Node</h4><ul><li><strong>Median Response Time: 24ms</strong></li><li>Min Response Time: 17ms</li><li>Max Response Time: 135ms</li><li>p95 Response Time: 29ms</li><li>p99 Response Time: 51ms</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iwQooImmFibKa670pwhJtQ.png" /><figcaption>Response time distribution for Node runtime simple CRUD API test, from X-Ray.</figcaption></figure><h4>Bun</h4><ul><li><strong>Median Response Time: 25ms (+4.2%)</strong></li><li>Min Response Time: 16ms (-5.9%))</li><li>Max Response Time: 157ms (+16.3%))</li><li>p95 Response Time: 33ms (+13.8%)</li><li>p99 Response Time: 44ms (-13.7%)</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qSZOMyWLTOc0753Xke4RUQ.png" /><figcaption>Response time distribution for Bun runtime simple CRUD API test, from X-Ray.</figcaption></figure><h3>Cold Start Times</h3><p><em>This test was run only 10 times for each runtime, as there is no great way to automate forced cold starts in a load test. Note that the results here reflect the full response time, not just the initialization times.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/992/1*Vkr8Jry7JnAr6xMwDl94Xg.png" /><figcaption>Lambda execution time stats for Node vs Bun simple CRUD API test, from CloudWatch.</figcaption></figure><h4>Node</h4><ul><li><strong>Median Response Time: 302ms</strong></li><li>Min Response Time: 252ms</li><li>Max Response Time: 361ms</li><li>p95 Response Time: 312ms</li><li>p99 Response Time: 361ms</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jYfPtkCPS4OUACKyoV2QsQ.png" /><figcaption>Response time distribution for Node runtime cold start test, from X-Ray.</figcaption></figure><h4>Bun</h4><ul><li><strong>Median Response Time: 775ms (+156%)</strong></li><li>Min Response Time: 717ms (+184%)</li><li>Max Response Time: 1382ms (+282%)</li><li>p95 Response Time: 1174ms (+276%)</li><li>p99 Response Time: 1382ms (+282%)</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uBZT95FDawPVKzkcto-Z3A.png" /><figcaption>Response time distribution for Bun runtime cold start test, from X-Ray.</figcaption></figure><h3>Interpreting the Results</h3><p>To my surprise, despite Node being specifically optimized for Lambda and the official Bun Lambda Layer being under-tested (and therefore not optimized), Bun managed to come out ahead in measurable and significant ways for CPU-bound tasks. It was also neck and neck for more simple and I/O-bound tasks, meaning you’re at a bare minimum unlikely to see a downgrade in performance from using Bun. I think if AWS Lambda were to add Bun as an official runtime, we’d see Bun perform at least slightly better than Node, if not with significant improvements. And if you’re running your logic with frameworks and libraries like Express, Nest, Apollo, or NextJS, I wouldn’t be surprised if you saw consistently faster performance (this is something I’d like to test next).</p><p>Is it ready for production? Well, I wouldn’t jump to that conclusion just yet, because I did run into some rough patches along the way with the Bun Lambda Layer, and it’s not particularly battle-tested at this point. Plus, there still are some NodeJS APIs not yet interoperable with Bun, and Bun itself is still very new, meaning we don’t know all of the quirks with it just yet. However, <strong>these are solvable problems</strong>, and these tests show that, with some effort, there is real potential for this to be a legitimate runtime for production serverless application development.</p><h4>Combating cold-start issues</h4><p>Obviously, the cold start problem is something to be aware of, but I wouldn’t call it a deal breaker as there are two popular solutions for making this problem nearly obsolete:</p><ol><li>AWS’s official solution of provisioned concurrency, which keeps a configured number of containers always warm for a cost. Depending on the load to your application, this could either be very reasonable or may be more expensive of an approach than it’s worth.</li><li>Custom warming solution that pings your Lambda function every so often to ensure a number of containers are always available. This is a good solution for lower throughput applications as it’s cheap and keeps a container ready for use whenever you need it.</li></ol><h4>Performance Benefits</h4><p>In common application use cases, simply swapping out NodeJS for Bun may make a slight improvement to latency, giving your applications a snappier feel. The more your application does in the compute itself, the more benefit you’ll see, so it will really depend on your specific use cases. That said, paired with a cold-start strategy, it seems like Bun will at least be on par with Node while offering all of its other development experience benefits.</p><h4>Cost Benefits</h4><p>Reducing execution time of Lambda functions has a direct positive impact on the cost of running your application, as Lambda functions are charged per millisecond of use. If you’re doing much CPU-bound logic in your application, you could see massive cost savings by switching to Bun, but if you’re just running some simple functions that call databases or other APIs and don’t do much with that data in the Lambda function itself, then you probably won’t see huge differences, plus you’ll have to pay for whatever cold start strategy you go with.</p><p>One other caveat to be aware of is that using the built-in Node runtime means you are not billed for initialization (cold-start) costs. On the other hand, <strong>you are charged for initialization of Lambda containers for Bun</strong>, so on top of combating cold-start issues for performance reasons, you would likely want to reduce these for cost benefit as well.</p><h3>Final Thoughts</h3><p>I was highly skeptical about Bun in general and especially in terms of potential for using it in a serverless application workflow. I was pleasantly surprised to have that skepticism quashed by these results. While I won’t be personally using Bun for Lambda development just yet due to its newness, I will be keeping a close eye on it as its ecosystem matures and as tooling for Bun on Lambda is hardened and optimized further.</p><p>As a side note, this article did not discuss the development experience of Bun, but the tl;dr is that it was a refreshing experience with extremely fast package installation and build times and effectively native support for testing Lambda functions locally - something that is otherwise more painful and requires additional tooling from AWS SAM. With more maturity, I think Bun has a real chance of overtaking Node as the industry default runtime for JavaScript and TypeScript development, and I’ll personally be rooting for it. Also, AWS Lambda, if you happen to read this article, please consider supporting Bun as a native runtime for Lambda.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ecd4fe7c2fc2" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>