AWS Case Study: Why Coca-Cola Migrated to AWS
Amazon Web Services commonly known as AWS is the leading public cloud provider having 2500+ services with a market share of 47.8% followed by Microsoft Azure, Google Cloud Platform, Alibaba Cloud and more. A public cloud provider virtually provides everything which is required for an application to run on a physical server owned by an organization. Now, when we talk about the cloud, it simply means that we can run our new startup or a full fledged business by using virtual Hard Disks, RAM, CPU and anything which is required without having to worry about the management of hardware and that too with very less investment so that even if you decide to shut down your operations anytime, you won't have to worry about your investments made in the hardware because everything is provided by cloud and you just have to pay it per hour basis.
About Coca-Cola
Coca-Cola is a bevarage company with hundreds of products which are independent brands in their own. Except Coca-Cola, Some of their famous products include Thumps Up, Fanta, Limca, Maaza, Sprite etc. The company operates in more than 200 countries and they also have a range of products in cold and hot tea and coffee too. Now most of you must be knowing about Coca-Cola but the question arises that Why Coca-Cola needs AWS?
The Problem Before
As Coca-Cola is a multi national company, they keep running their marketing campaigns both online and offline to build their brand value. They used to host and run multiple marketing campaign websites for their multiple brands on their own on-premise servers but in 2013, they advertised in one of the biggest sports event in US called Super Bowl. They tested everything beforehand with 10x the expected traffic on their website. For a few days in starting everything was fine but the problem got bigger when amount of traffic exceeded even the limit their all the servers could handle together and they didn't have anything for backup. Now, the thing is even if they buy more servers it may be waste of time, money and resources if they didn't get that amount of traffic in future or in other perspective it may happen that they may again get more traffic than new servers combine can handle then they will have to keep spending on resources and traffic never remains same. Also, website down for even a few seconds is a huge loss for businesses which they can't afford as it's a loss of reputation for the brand too. For example, Google, Amazon, Twitter etc. If these websites get down even for few seconds, it becomes a news all over the internet.
Migration to a Cloud Provider
It was the time for Coca-Cola to move to a cloud provider so that they can run their marketing campaigns without having to worry about anything but they had to choose a provider which would fulfill all their needs so that they don't have to experience the same problems again. Following were the things which they had to consider while migrating to a cloud provider :-
Auto Scaling - This was the most important point for a business that their servers should keep increasing or decreasing according to the amount of traffic they get and their website should never go down.
Price - Their cost should not be more than what they have been paying for on-premise instead everyone prefers that the cost should always be lower than on-premise servers.
Support for the stacks - Any cloud provider they choose must have the support for each and every technology they use for their online promotions or their online business so that they can run it smoothly.
Managed capabilities - Things or technologies which require a team of people to manage while working with on-premise servers should be managed by the cloud provider itself.
Technical support - Whenever things go wrong or the company doesn't understand something, there must be a good technical support in order to resolve their problems that too in a short duration of time and in an efficient way.
Automation - This is also one of the most important factor in choosing a cloud provider that the people using it should have some kind of APIs or SDKs whichever possible so that they can automate things at their end and save their time with quick testing and deployments.
Metered billing - Everything they use on the cloud should charge only for those resources which they used and only for the time those resources were used with an adequate dashboard to show the billing of each and everything in detail so that the company knows where they spent the money and where the cost can be reduced.
Security - This doesn't need any explanation. Security is the most important thing for an organization which can't be compromised at any cost.
Now when Coca-Cola looked for it, they found none of the cloud providers provide everything which they require except AWS at that time back in 2013-14, every other provider lacked in one thing or the other but AWS had everything and it still has more than anyone needs and more than we expect from a cloud provider. So, it was clear thet they chose AWS for their business operations from that time onwards.
Early Days After Migration
Initially when Coca-Cola started operating on cloud, their costs were 10x more than their on-premise servers and at that time everyone was talking about all the costs they were able to save while using cloud than they may have to pay while working with on-premise servers. So, they had to learn more and change the way they used the cloud for their business operations. They improved the following things described below in the way they operated on cloud :-
It's hard for anyone to change the habits of on-premise servers, so they had to rethink the way they were using the cloud and now they started turning off their instances which were not in use like environments used to testing the websites which are already in production, in order to save the costs.
Automation cut 80% of operations cost for Coca-Cola. They followed DevOps model to automate their business operations in cloud and then they didn't need their operations team much in order to handle their new campaigns, it was already being done by developers itself.
They moved their static sites to s3 which used to get very less amount of traffic and didn't matter much so they didn't have to pay for a complete EC2 Instance this lowered their cost from $20K to $1K by rethinking architecture.
This way they were able to do save 20% of their costs and it was a green signal for the company to move ahead with AWS and they started reducing their dependency on their on-premise servers.
The New Architecture
Automation - They used Python and Amazon Cloudformation etc. tools to automate the operations which lowered down their operations cost and saved a lot of time by changing their traditional way of creating tickets for the support team to change every little thing. They also used github to keep track of changes in the code of infrastructure.
Isolation - They used IAM (Identity Access Management) service of AWS to isolate all the environments of different brands so that one site or marketing campaign should not affect the other one. This way they could also keep track of metered billing separately for each brand of them.
Auto Scaling - For auto scaling, they used Elastic Beanstalk, which also gives the power to choose platform of their own choice as well as which version they want and as per requirement auto scaling is handled by elastic beanstalk itself by specifying minimum and maximum instances for the operation which requires a lot of work on on-premise servers. Also, cloudformation IAAC (Infrastructure as a Code) service helps a lot in this. They were able to quickly launch any environment in a matter of minutes. Auto scaling also lowers the cost as you need to pay only when traffic was there and those servers weren't switched on all the time.
Zero Downtime Deployments - Now this is something which everyone requires. Elastic beanstalk also gave the power to deploy the new version of any website or app without interrupting the normal flow of the client already interacting with the server. They also got the flexibility to switch to older version in one click if something goes wrong or anything isn't working.
Then slowly they started moving everything to the cloud because they were loving working with it, the flexibility options it has and the way it makes things easy for them to work. They started loving the automation and auto scaling and how it reduced a lot of costs for them and now they could focus more on other things.
Final Results
By rethinking and redesigning the architecture, the Coca-Cola team was able to reduce their costs to 40% compared to their on-premise servers. In 2017, they sold their last on-premise servers in their Atlanta data center to Rackspace when they migrated to Serverless architecture on cloud. Now, serverless doesn't mean that no servers are needed but it simply means that we do not have to worry about the servers, it will be managed by cloud provider itself and you just have to focus on your use case. In case of Coca-Cola, they have vending machines all across the US which have integrated payment system from the card. Earlier they used 6 EC2 t2.medium instances including some services like Elastic Load Balancers, Automation, Security etc. and would cost them around $13000/year to operate because these instances had to remain switched on all the time as anyone can make request to vending machine at anytime. But now they use AWS Lambda FAAS (Function as a Service), in which servers are managed by AWS and all that load balancing, security, management etc. is handled by AWS, now they have to pay only when API call is made to their payment gateway which function is running on AWS Lambda and this way, their cost came down to $4490/year saving them huge amount of money on their operations and they are still with the Market Leader in Cloud provider AWS.