<?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[We Are Serverless - Medium]]></title>
        <description><![CDATA[We are not your usual tech consultancy. Our goal is to provide you with the expertise to start your own serverless transformation, and once we start working together, we will work hard to remove ourselves as the bottleneck. - Medium]]></description>
        <link>https://medium.com/we-are-serverless?source=rss----64d557069ec0---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>We Are Serverless - Medium</title>
            <link>https://medium.com/we-are-serverless?source=rss----64d557069ec0---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 11:42:07 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/we-are-serverless" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[A technical deep dive into processing €5 million in donations in 2 hours using Cloudflare Workers]]></title>
            <link>https://medium.com/we-are-serverless/a-technical-deep-dive-into-processing-5-million-in-donations-in-2-hours-using-cloudflare-workers-fd857ea5cd37?source=rss----64d557069ec0---4</link>
            <guid isPermaLink="false">https://medium.com/p/fd857ea5cd37</guid>
            <category><![CDATA[serverless-architecture]]></category>
            <category><![CDATA[cloud-native]]></category>
            <category><![CDATA[serverless]]></category>
            <category><![CDATA[continuous-integration]]></category>
            <category><![CDATA[cloudflare-workers]]></category>
            <dc:creator><![CDATA[Peter Vanhee]]></dc:creator>
            <pubDate>Mon, 07 Dec 2020 08:22:49 GMT</pubDate>
            <atom:updated>2020-12-07T16:20:34.001Z</atom:updated>
            <content:encoded><![CDATA[<h4>A deep dive into the serverless architecture behind the Late Late Toy Show donation platform and the challenges we faced in putting it together in just a couple of weeks.</h4><p><em>For an introduction to our serverless platform for RTÉ’s Late Late Toy Show, see this </em><a href="https://medium.com/p/b198d4d96a06/edit"><em>article</em></a><em>.</em></p><p>In this article, we’ll give you a factual blow-by-blow replay of the evening, together with a deep dive into the technology under-pinning it all. Not everything went according to plan (does it ever?), however the RTÉ Toy Show Appeal was <a href="https://www.rte.ie/news/2020/1127/1181016-late-late-toy-show-charity-appeal-raises-more-than-5m/">a resounding success</a>.</p><h3>The Project</h3><p>The brief for the first ever commercial project for our agency, <a href="https://www.weareserverless.com/"><strong>We are Serverless</strong></a><strong> </strong>was as follows:</p><blockquote><em>Build a donation platform for Ireland’s most popular TV program, RTE’s Late Late Toy Show, and have it ready to go within four weeks</em>.</blockquote><p>With this being the first time that there would be a donation ask on the Toy Show, we had no idea of how much money would be raised, nor how many viewers would be converted to donors. We only knew the following:</p><ul><li>estimated audience of 1.5 million viewers in Ireland plus Irish diaspora from 130+ countries globally</li><li>we should allow for effortless scaling, from nearly zero activity to thousands of requests per second</li><li>potentially handle hundreds of transactions per second</li><li>build it lean; the more code and complexity the application itself would have, the longer it would take to build and the harder it would be to operate at scale</li></ul><h3>Building the platform</h3><p>For our first challenge, we had to decide on the underlying architecture for the platform, we settled on Cloudflare Workers.</p><p>As far as serverless platforms go, <a href="https://workers.cloudflare.com/">Cloudflare Workers</a> might be less well known than <a href="https://aws.amazon.com/lambda/">AWS Lambda</a>. However, they would allow our code to run on Cloudflare’s global edge network rather than on regional instances. Cloudflare, unlike any other cloud computing services, doesn’t use containers or virtual machines, but <a href="https://blog.cloudflare.com/cloud-computing-without-containers/">V8 isolates</a>, the technology created by the Google Chrome team to run javascript in the browser. Practically for us this meant code would run closer to our end-user making the request, and invocations wouldn’t incur any cold start, which can run into the 100s of ms.</p><p>The results from our load testing using <a href="https://github.com/Nordstrom/serverless-artillery">serverless artillery</a>, <a href="https://grafana.com/">Grafana</a> and <a href="https://www.influxdata.com/">InfluxDB</a> were promising. We simulated slamming the site with up to 300 donation journeys for a few minutes and saw request latencies not higher than 416ms for 9 out of 10 of the requests , and on average only 77ms.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qQkS7B41UtYIICuybsFtJA.png" /><figcaption>Request latencies of load tests against the platform.</figcaption></figure><p>Whilst for obvious reasons we couldn’t measure latencies during the event itself, the results from the evening as measured by Cloudflare were even more impressive: <strong>99% of the requests used less than 6.6 ms CPU time</strong>, and this stayed flat throughout the evening and the next day. Only in the 99.9th percentile, we saw a little bump which coincided with the <strong>donation peak, at around 11.34pm</strong>. With AWS Lambda we were used to seeing functions running for 100s of ms, and seconds during the warm-up phase, so having functions consistently run for less than 10ms, without the inevitable penalty, was quite the sight!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*M5DHg3PWSatqmADkM12vRg.png" /><figcaption>CPU time used by Cloudflare requests, from Friday morning until Saturday morning.</figcaption></figure><p>The second challenge was to use a payments platform that could process hundreds of transactions a second without breaking a sweat: for this, we quickly settled on Stripe. Considering RTÉ’s previous charity appeal show’s performance, <a href="https://en.wikipedia.org/wiki/RT%C3%89_Does_Comic_Relief">RTÉ Does Comic Relief</a>, we were comfortable with the existing limits on Stripe, and RTÉ’s charity partner <a href="https://www.communityfoundation.ie/">The Community Foundation for Ireland</a>, had let Stripe know about the event. Little did we know then that The Late Late Toy Show would break all records, and we’d quickly bump into this limit.</p><p>As we wanted to keep the stack as lean as possible, we heavily relied on <a href="https://stripe.com/docs/api/metadata">Stripe metadata</a> and related <a href="https://stripe.com/en-be/sigma">Stripe Sigma</a> (basically <a href="https://prestosql.io/">Presto</a>) to store and query the small extra pieces of data that weren’t necessary to card transaction, such as the user choosing a tax refund on larger donations. This allowed us to deliver live reporting of totals and perform SQL queries on the data held by Stripe, removing a lot of the stress of having to think about data storage and related scalability.</p><h3>Timeline of events</h3><ul><li>The show starts at 9.35pm. Quite some anticipation on Twitter, and the first official tweet goes out to ask for a donation. We are sitting at around €10k of donations and thought we were in for a quiet night.</li><li>We start to see traffic spiking up, especially when the show’s host Ryan makes a first donation ask, at around 10.30pm, briefly after <a href="https://www.rte.ie/entertainment/2020/1127/1181003-saoirse-ruane-shares-inspiring-story-on-toy-show/">Saoirse shared her brave and inspiring story</a>.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Wo-3e5DSmZ1R7T7-G8U1Ng.png" /><figcaption>Saoirse was one of the kids starring on the Toy Show which make it such a special event in Ireland.</figcaption></figure><ul><li>All of sudden, things are happening, traffic is spiking up and we see the donation totals shooting up by tens of thousands of euros a second.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/788/1*VcOfCs26fD1aj8NkV2q_QA.png" /><figcaption>Cloudflare request chart, from near-zero activity to the first 100K requests in just a few minutes.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dmj9KCAjpF4-AhMD30tjkw.jpeg" /><figcaption>Lots of people hit Stripe’s request rate limits on the night and were shown this screen.</figcaption></figure><ul><li>Then activity goes off the charts, and we see the first warnings of Stripe’s API returning rate limiting errors coming from <a href="https://sentry.io/">Sentry</a> and the Stripe Dashboard, followed by users reporting the same on Twitter. Whilst the platform itself is responding quickly, a percentage of users are unable to get through due to rate limiting from Stripe. We get on the phone with the team over at RTÉ and the account manager at Stripe. All teams involved are incredibly quick to respond and less than half hour later Stripe’s limits are raised 5x. In the meantime, we get a call from Stripe’s CTO, who reassured us we shouldn’t see any further issues. Twitter is now on fire (<a href="https://twitter.com/hashtag/latelatetoyshow">#latelatetoyshow</a> is trending worldwide) and lots of people (rightfully!) thanking Stripe. They were absolutely stellar in their response.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JRzgtKyKMti4BKBaSv5EuQ.png" /><figcaption>Stripe’s CEO tweeting about the capacity increase.</figcaption></figure><ul><li>Donations keep streaming in. We record a peak of <strong>151 donations per second</strong> at 23:13:54. We also see a longer peak minute of <strong>6988 donations per minute</strong> at 23:35 — that’s <strong>over 110 donations per second for the entire minute</strong>. By midnight, the platform has raised <strong>over 5 million euros</strong>, with the <strong>bulk of donations (over 4 million) in just one hour</strong>, from 11pm to midnight.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SV_gYId13gVVIe-7Pt_YJQ.png" /><figcaption>Donation spikes per second throughout the evening.</figcaption></figure><ul><li>We wrap up a few hours later. It’s been a long and exciting night, and we need to get ready for the show’s replay on Saturday afternoon. In total, over <strong>€6.5 million</strong> was raised (at the time of writing, whilst the <a href="https://www.rte.ie/toy-show-appeal">site</a> is still open until December 14th 2020), and our Cloudflare workers received <strong>over 4 million requests</strong>.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CjrRXJZerm8Z4Ntd6UjiJQ.png" /><figcaption>Requests to CloudFlare, from Friday morning until Saturday evening.</figcaption></figure><h3>Inside the platform</h3><p>We intentionally kept the platform logic as minimal as possible. At the core, we have a single <a href="https://developers.cloudflare.com/workers/platform/sites">Worker Site</a> which does two things: it serves the static ReactJS front-end and responds to a back-end route. That back-end route is the core of handling payments, creating a payment intent to Stripe’s APIs using the user-submitted data and returning any feedback.</p><p>We automated testing of the platform through <a href="https://www.cypress.io/">Cypress.io</a>, which simulates a full payment journey on the staging environment using Stripe’s test mode, and run this for every commit to our main branch using <a href="https://github.com/features/actions">Github Actions</a>. We then deploy, again using Github Actions and <a href="https://github.com/cloudflare/wrangler">Wrangler</a>, to RTÉ’s Cloudflare account. The simplicity of our testing and deployment pipeline meant that we could iterate quickly with the entire team, whilst making sure our core functionality was kept stable.</p><p>All warnings are logged in <a href="https://sentry.io/organizations/we-are-serverless/issues/">Sentry</a>, and sent through to our Slack. We logged a large number of Sentry events on the evening, many of them related to specific browser behaviour and console warnings brought in by dependencies (such as our integration with RTÉ’s official header and footer). Fortunately for us, and a testament to our extensive cross-browser testing using <a href="https://www.browserstack.com/">Browserstack</a> ahead of time, none of the reported errors and warnings were deemed to be critical to the user journey. We are now sifting through these events and using the knowledge to improve the platform for its next incarnation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XuIQpO9YNfBBUyJxGQ436A.png" /><figcaption>Sentry events, with a clear peak on Friday evening.</figcaption></figure><h3>A few lessons learned</h3><ul><li>Our platform scaled effortlessly. With a traditional infrastructure approach, at best we’d be massively over-scaled and thus overpaying, and at worst the platform would be overloaded and unavailable.</li><li>Serverless is faster when running at the edge (via Cloudflare Workers, or <a href="https://aws.amazon.com/lambda/edge/">AWS Lambda@Edge</a>). In addition, Cloudflare Workers don’t suffer from a typical “cold start”, keeping request times flat throughout the event as traffic ramped up.</li><li>Always<strong> </strong>have a direct communication plan with your dependencies when there’s a risk that their services could be a limiting factor for your application.</li></ul><p><em>We want to thank everyone at RTÉ, CFI and Stripe for making us a part of this journey raising millions of euros for a great cause. This article was written with contributions from the entire </em><a href="http://weareserverless.com/"><em>We Are Serverless</em></a><em> team. If you’d like work with us, please drop us a message on info@weareserverless.com.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fd857ea5cd37" width="1" height="1" alt=""><hr><p><a href="https://medium.com/we-are-serverless/a-technical-deep-dive-into-processing-5-million-in-donations-in-2-hours-using-cloudflare-workers-fd857ea5cd37">A technical deep dive into processing €5 million in donations in 2 hours using Cloudflare Workers</a> was originally published in <a href="https://medium.com/we-are-serverless">We Are Serverless</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The RTE Toy Show Appeal — converting millions of viewers to millions of Euros with Serverless]]></title>
            <link>https://medium.com/we-are-serverless/the-rte-toy-show-appeal-converting-millions-of-viewers-to-millions-of-euros-with-serverless-b198d4d96a06?source=rss----64d557069ec0---4</link>
            <guid isPermaLink="false">https://medium.com/p/b198d4d96a06</guid>
            <category><![CDATA[stripe]]></category>
            <category><![CDATA[serverless]]></category>
            <category><![CDATA[charity]]></category>
            <category><![CDATA[cloudflare]]></category>
            <category><![CDATA[rte]]></category>
            <dc:creator><![CDATA[Caroline Rennie]]></dc:creator>
            <pubDate>Tue, 01 Dec 2020 10:37:55 GMT</pubDate>
            <atom:updated>2020-12-02T15:47:02.195Z</atom:updated>
            <content:encoded><![CDATA[<h3>The RTE Toy Show Appeal — converting millions of viewers to millions of Euros with Serverless</h3><p><em>The Late Late Toy Show </em>is the most watched show in Ireland every year with a 70%+ audience share and over 1.5 million viewers on their live show. Every year they put on extraordinary entertainment for the nation and 2020 was no exception.</p><p>The show’s host, Ryan Tubridy, explained:</p><blockquote><em>We know, now more than ever, that the kids of Ireland, who have been so good, deserve a night like no other. So we’re putting more effort and more love into this thing than you can imagine.</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/615/1*exREX14gwjAEFjMWdVR-Vg.jpeg" /><figcaption>Ryan Tubridy as <em>Fantastic Mr Fox </em>in The Late Late Toy Show’s opening number</figcaption></figure><p>This year, Ryan and the team decided they needed to do something extra special to lift the nations spirits so they created the RTÉ Toy Show Appeal — the appeal would raise money for children’s charities across Ireland to be distributed by The Community Foundation for Ireland. Needless to say, the Irish nation rose to the occasion!</p><p>By the end of the first broadcast on Friday night, the appeal has already raised an incredible €5.2 million, with the total continuing to climb (at time of writing it’s now over €6.5 million). Thousands of Toy Show fans have donated so far and it’s not too late to show your support:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*R4cWELME1_R3OPG0trg5Ng.jpeg" /><figcaption>Donate to the RTÉ Toy Show Appeal at <a href="https://www.rte.ie/toy-show-appeal/">rte.ie/toyshowappeal</a></figcaption></figure><h3>How did they do it?</h3><p>The final sign-off to run the RTÉ Toy Show Appeal was less than 2 months before broadcast and with it, the new requirement to process donations from the live show. That’s where We Are Serverless comes in. Managing broadcast-driven transactions is one of our specialities and we were happy to take up the challenge for this new appeal.</p><p>Here’s where we’re going to get a bit nerdy…</p><p>Dealing with unpredictable traffic in traditional infrastructures can be exceedingly costly or high risk. This is because to work within infrastructures which require you to estimate the scaling requirements comes with an intrinsic element of finger-in-the-air guess work. The challenge with TV audiences is particularly poignant — ask any broadcaster and they’d give their right arm to have an accurate idea of how many viewers they’ll have for their show. TV viewership is still measured in the “overnights” so even during a broadcast, producers don’t have any accurate means to report on their audience figures. While there was historic data for The Late Late Toy Show’s audience figures, there was no way of knowing how effective a call-to action to donate would be. This leaves hosting provisioners with a conundrum:</p><ul><li>Estimate too low and you’ll overload your servers, some users will not be able to access your site or — worst case scenario — no users can access it. So in short, it’s bad.</li><li>Estimate too high and you’ll be sat comfortably managing the traffic on your site — but at a cost. Every second you’re below your estimated traffic volume equates to cost wastage. What a nightmare, right?</li></ul><h3>What’s the solution?</h3><p>Serverless, of course.</p><p>With serverless hosting, you’re provisioned for your precise traffic needs. Working in a pay-per-use model means that when your website has low traffic, you’re only paying for what’s being used, but if it suddenly has high traffic surge, you’ll automatically scale to meet demand. For the appeal, this meant we were managing zero or negligible traffic throughout the day and were ramping up to thousands of requests per second during the show.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aq9j7HC1NNDSI0w8fwzyiA.png" /><figcaption>Number of requests per second to the RTÉ Toy Show Appeal donation application</figcaption></figure><p>What’s great about Serverless is that it’s evolving rapidly and tooling is coming further and further downstream so that you don’t need to have ever considered configuring a server to be able to build full stack applications. For the RTÉ Toy Show Appeal use case, We Are Serverless chose Cloudflare Workers as our weapon of choice — for a lightweight application with minimal downstream integrations, it was the most cost effective and time efficient solution for our needs (did we mention we had 4 weeks to pull this all together?).</p><p>In terms of getting up and running within our time constraints, Stripe was the obvious choice for Payment Service Provider; it was very quick for the Community Foundation for Ireland to set up an account so that all income is deposited directly into their bank account. This means that the millions of Euros donated can be distributed as quickly as possible to the range of children’s charities the RTÉ Toy Show Appeal is supporting.</p><p>For the first year of the RTÉ Toy Show Appeal, we made the decision to also use the Stripe platform as the main data storage for the donations. We were able to track call center agents activities (giving the team at Abtran a little friendly competition) and the ability to run live totals throughout the night from Stripe’s dashboard.</p><p>This approach kept things very simple as We Are Serverless and RTÉ would never touch customer data and Community Foundation for Ireland had all the data they needed for auditing, processing Tax Relief and refunds.</p><h3>What were the challenges?</h3><p>Serverless applications are fantastic for automatically scaling but awareness of downstream bottlenecks is essential to make sure all your dependencies can scale with you. Partnering with high scale payment processors, Stripe (founded by Patrick and John Collison who have personally donated €100,000 to the appeal), meant we were confident that our downstream dependencies would be able to scale if required. During the broadcast we were hitting some of Stripe’s rate limits and within 30 minutes they had lifted the capacity 5x to manage the demand.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ATw-p6-rfhywZT9k" /><figcaption>Patrick Collison RTÉ Toy Show Appeal Tweet: <a href="https://twitter.com/patrickc/status/1332462275471478784">https://twitter.com/patrickc/status/1332462275471478784</a></figcaption></figure><h3>What happens next?</h3><p>The RTÉ Toy Show Appeal will be open for another 2 weeks with donations coming in from across the globe. We Are Serverless will be wrapping up the project with RTÉ and The Community Foundation for Ireland, reviewing what’s gone well, what we’ll do differently and what we’ve learned. Community Foundation for Ireland will distribute all the money raised to a range of children’s charities across Ireland and RTÉ will get planning on how they’ll follow this year’s success for their next Toy Show.</p><p>If you have a scaling challenge or need help optimising your stack then we can help! Get in touch either via our website at <a href="https://www.weareserverless.com/">weareserverless.com</a> or drop us an email to <a href="/service/mailto:info@weareserverless.com">info@weareserverless.com</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b198d4d96a06" width="1" height="1" alt=""><hr><p><a href="https://medium.com/we-are-serverless/the-rte-toy-show-appeal-converting-millions-of-viewers-to-millions-of-euros-with-serverless-b198d4d96a06">The RTE Toy Show Appeal — converting millions of viewers to millions of Euros with Serverless</a> was originally published in <a href="https://medium.com/we-are-serverless">We Are Serverless</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>