Start free trial

Central data platform for your serverless environment.

Get full access to all premium features for 14 days. No code changes and no credit card required.

Password: 8+ characters, at least one upper case letter, one lower case letter, and one numeric digit

By signing up, you agree to our Privacy policy and
Terms and Conditions.

Serverless Case Study – Coca-Cola

Share

A while back I talked about how big companies have started using serverless in production and how this is a clear sign that we will see more implementation of the serverless infrastructure in the near future. I’d like to take some time today and talk about one of the companies that are using serverless in production: Coca-cola.

Back in 2016, Michael Connor from Coca-Cola North America, the person in charge of the company’s cloud migration strategy, has taken the stage at AWS Re-invent to give a glimpse into the tools and strategies they’ve developed in order to make their next generation of digital marketing applications completely serverless, and a peek into the innovative ways they’re planning to use AWS Lambda in the future.

While explaining the multiple issues that traditional servers have(he was at a Serverless conference, the server bashing was mandatory) he came across a point that really resonated with me personally:

Nowadays, developers need to know devops in order to build enterprise applications.

Think about it for a second. Most companies rely on developers to run and manage their servers. That’s not a good use of their time. It’s fun to know whatever black magic needs to be inputted into those Linux terminals in order to make the app load but that should not be a prerequisite.

[Caution! “Back in my time” story coming up. Overt your eyes]

When I started out coding there was little to no difference between frontend development and backend development. In fact, we used to all be in the same boat, Developers. For web, front-end development meant html and css. Then, around the year 2004 when Ajax became a thing we added Javascript to the mix of things that a front-end developer needs to know. A couple of years later, the powers that be, decided that a frontend developer needs to know a little design, maybe a little Photoshop or Illustrator, and some user experience and user interface design.

Don’t believe me? Lookup job ads for front-end developers right now and compare them to job ads from 2006 – 2009. You’ll see a clear pattern.

Ok, fast forward to 2018. As a frontend developer, you need to know all the technologies mentioned above plus a little Angular, React, Redux, VueJs, Aurelia, SemanticUI, Bootstrap, Bulma, Foundation and the list can go on for quite a while.

And that’s for the frontend of the application. The backend is even worse. Add to that “the new normal” which is that a backend developer needs to be able to deploy, monitor, manage, make security updates, and so on so forth. Again, look up backend job ads, you’ll come to the same conclusion.

How is serverless any different?

Serverless will still have you learn and use a bunch of the same frontend frameworks but it will take away the pressure of doing all the backend, management, plugging of security holes, etc. This will allow you to focus on the app, the UX, UI, and the business logic while everything else will be served on a platter.

Coca-cola ❤️ Serverless

Back to the topic at hand, let’s see how Coca-cola uses serverless to improve their service.

Their vending machines that you find around the globe have an integrated communication system with the Coca-Cola HQ. This is how the guys servicing those machines know if a particular machine is running low on a beverage or if something is broken. The same system is used by the marketing teams that can create campaigns like “Buy one get one free” or the ones where the user gets credit for every Coke product he buys.

To start comparing the two options, infrastructure as a service vs functions as a service let me explain what Coca-cola was doing before serverless. Their oldest vending machines (the ones with the functionality I mentioned above) are about 10 to 12 years old. Up until 2016, they had been using 6 EC2 T2.Medium machines that cost them $12,864/year to operate. This included Automation, Elastic load Balancer, Management, Security, etc. Within this, close to $13,000 they got everything they needed to run those vending machines for a year.

After moving to a serverless framework, adding up the costs for all the features they needed, it came down to $4,490/year. This was calculated for the 30 million requests they were getting at the time. Connor stated at AWS re:invent that the break-even point, where having infrastructure as a service would even begin to make sense would be around 80 million calls per month. That’s 3 times what they were expecting to get at the time.

Coca-cola went from $13000 per year to $4.500 per year after switching to serverless

So how does it actually work

The logic behind the vending machines is quite straightforward. The client buys a drink, the machine calls the payment gateway(which so happens to be a Coca-cola Partner) to verify the purchase which makes the rest API call to the AWS API Gateway which triggers a lambda. The AWS Lambda will handle all the business logic behind the transaction. If a user-initiated the transaction through a mobile device there’s a 5th step involved which is to do a push notification to their phone submitting the information to Android Pay or Apple Pay.

Another impressive aspect of their serverless implementation is that all that communication happens in less than 1 second and they only have to pay when they have an actual request.

The conclusion

Serverless has been such a big step forward for The Coca-Cola company that they have made it so when you have an idea in the company and you take it to the architecture review board, your idea has to be based on serverless.

Right now they are forced into using both the EC2 instances and the newly developed serverless system until they replace the old vending machines with a newer model that works on serverless. Basically, they will have to support the old machines with the 6 EC2 instances that cost $12K a year for the foreseeable future or until the oldest vending machines can be “sunset”.

With Serverless this will never happen. Imagine for a second ten or twenty years from now when they’ll switch a different system(not sure they’ll ever do that but for the sake of the argument let’s imagine a scenario like that). As the serverless vending machine die off the cost will decrease to the point where if they have less than 1 million requests per month they will get their cost down by 99%.

I personally look forward to hearing more from Coca-Cola and how they implemented serverless within their organization. And while I’d love to keep writing this article but I have to run down to the store because for some reason I have this unexplainable urge to drink a crisp cold bottle of Coke.

Made by Developers for Developers

Our history and present are deeply rooted in building large-scale cloud applications on state-of-the-art technology. Dashbird was born out of our own need for an enhanced serverless debugging and monitoring tool, and we take pride in being developers.

Trusted by hundreds

https://mk0dashbirdiokg5ry66.kinstacdn.com/wp-content/uploads/2020/10/gus-gordon__1_.png

Gus Gordon

Dashbird helped us refine the size of our Lambdas, resulting in significantly reduced costs. We have Dashbird alert us in seconds via email when any of our functions behaves abnormally. Their app immediately makes the cause and severity of errors obvious.

https://mk0dashbirdiokg5ry66.kinstacdn.com/wp-content/uploads/2020/10/gus-gordon__1_.png

Gus Gordon

Dashbird helped us refine the size of our Lambdas, resulting in significantly reduced costs. We have Dashbird alert us in seconds via email when any of our functions behaves abnormally. Their app immediately makes the cause and severity of errors obvious.

Read our blog

AWS Well-Architected Framework in Serverless: Reliability Pillar

In this article, we will focus on the AWS WAF Reliability (REL) pillar: the Foundations, Failure and Change Management.

AWS Well-Architected Framework in Serverless: Operational Excellence

This article will discuss the second most crucial pillar of the AWS Well-Architected Framework: Operational Excellence (OPS).

AWS Well Architected Framework in Serverless Part I: Security

In this article, we’ll give you a short introduction to the AWS Well-Architected Framework and dive deeper into the Security pillar.

What Is Lambda Expression?

Lambda expressions have often been the subject of mystery for developers. Here’s a short explanation on what they actually are.

Microservices and Serverless: Winning Strategies and Challenges

In this article, we’ll deep dive into the benefits, challenges, and best practices of using microservices in serverless.

Go to blog