By creating an online marketplace for third-party vendors, Konga has become a household name in Nigeria. Founded in 2012, Konga today hosts products from clothing to electronics, power generators, and beauty products. At the core of Konga’s business is the task of maintaining the marketplace and website, to help ensure that an active customer base of more than 180,000 users can connect with over 10,000 vendors. To handle high volumes of concurrent users on site, Konga migrated its infrastructure to a more scalable cloud solution. Over time, however, that new infrastructure began to fall short of expectations.
“We were running too hot,” says Andrew Mori, Director of Technology at Konga. “We started to notice that our cloud infrastructure was not being managed in a cost-effective and performance-oriented way. We had built a solution that was relatively easy to scale up, but remained very expensive in its lowest state, for example, at 3 a.m., when everybody is asleep.”
“With Google Kubernetes Engine, we deliver the same or better functionality as previously in terms of being able to scale up to match traffic, but in its lowest state, the overall running cost of the production cluster is much less than the minimum costs we’d pay with the previous architecture.”
—Andrew Mori, Director of Technology, Konga
To match costs and performance more closely to demand, Konga created a containerized architecture on Google Kubernetes Engine that combines high availability with low costs at rest.
“With Google Kubernetes Engine, we deliver the same or better functionality as previously in terms of being able to scale up to match traffic, but in its lowest state, the overall running cost of the production cluster is much less than the minimum costs we’d pay with the previous architecture,” says Andrew. “That has had a massive impact on our costs.”
Creating scalable clusters for optimal efficiency
Online retailers typically experience pronounced peaks and troughs in traffic, related to the time of day, day of the week, and season. Konga created a cloud infrastructure solution that scaled to meet peaks in traffic, but continued to generate substantial running costs during quiet periods. “We had web servers running that were sized specifically for a certain use and they would be scaled horizontally when under load,” says Andrew. “When there was not a lot of traffic, our bare minimum was two servers with a load balancer sitting in front of them. The essential problem was that we were paying for CPU cycles, for memory that we were only utilizing at peak, so about 95% of the time we were paying for idle resources.”
Rather than customize virtual machines through the cloud provider, Andrew and the team at Konga decided to move to managed containers, as a more cost-effective solution with greater potential for future flexibility.
“With a containerization strategy, we were able to squeeze more concurrent applications and processes into a given set of computational power. Kubernetes lets us squeeze more into less, and the cost savings are a direct benefit of that.”
—Thomas Fowler, Managing Director, DotModus
“Once we had decided to move to a managed containerized system, choosing Google Cloud Platform (GCP) was an obvious move,” says Andrew. “The Kubernetes technology was built at Google, and–perhaps unsurprisingly–we found that Google Kubernetes Engine was the best platform to run it on.” An additional consideration was Google’s point of presence in Africa. “A local point of presence is a major consideration for large African enterprises with lots of traffic, that often have to query networks in Europe,” says Andrew. “Google is one of the only cloud providers with a point of presence in Africa, and though that needs to be expanded, choosing Google is a strategic decision.” At the same time, Andrew was reassured by the portability of the Kubernetes solution, which could easily and cheaply be migrated between cloud providers, should the need arise.
Because Konga had no experience orchestrating the management of a group of containers, Andrew and his team joined forces with Opennetworks and DotModus, two Google Cloud Partners that walked Konga through the migration to GCP. “The attention that I’ve received from the partner network and Google is something that, having used multiple cloud providers, I had not experienced before,” says Andrew. “I walked away from the project feeling very well supported and very much looked after and listened to. I'm a seriously happy customer.”
Scaling clusters instead of load-balancing servers, Konga has dramatically cut costs by applying resources more efficiently. “With a containerization strategy, we were able to squeeze more concurrent applications and processes into a given set of computational power,” says Thomas Fowler, Managing Director at DotModus. “Kubernetes lets us squeeze more into less, and the cost savings are a direct benefit of that.”
“We’ve trimmed some fat from our solution in several areas, but the vast majority of our $55,000-a-month cost reduction is due to Google Kubernetes Engine. Server response times in some applications are up 5%, while others have improved by 400%. We didn’t expect that, but it’s a great sign.”
—Andrew Mori, Director of Technology, Konga
Collaborating on solutions from the Ukraine to South Africa
“An interesting aspect of this experience was that we all worked together on this project from different parts of the world,” says Andrew. “We didn’t have to use VPNs or any kind of traditional infrastructure, and we had people sitting in the Ukraine, South Africa, and Nigeria all working together towards the same goal every single day in Kubernetes Engine, Google Compute Engine, and Google Cloud SQL.”
A lasting legacy of the project is the reduced maintenance and management burden on Konga IT staff. “Previously we had to maintain and manage scripts to keep our infrastructure up,” says Andrew. “Now all of our application infrastructure is committed as code into our repository, so when we need to change our infrastructure we just work on that code. That’s reduced the cost overhead of managing our applications. Our DevOps team has decreased in size from eight people to two, while the scope of what we manage has actually grown. The job of the infrastructure team now is to periodically click the upgrade button on Kubernetes to make sure that we're on the latest supported versions. That's it.”
Lower costs and improved performance
Before implementing the new solution, Konga spent $85,000 to $120,000 a month on cloud infrastructure. That figure has been cut to less than $30,000 per month. “We’ve trimmed some fat from our solution in several areas, but the vast majority of our $55,000-a-month cost reduction is due to Google Kubernetes Engine,” says Andrew. At the same time, Andrew notes significant performance increases in communication between applications in the network stack. “The rate varies from application to application, but server response times in some applications are up 5%, while others have improved by 400%. We didn’t expect that, but it’s a great sign.” And with the migration completed, Andrew is already looking to take things further.
“One can't sit still in this environment,” says Andrew. “Serverless architecture on Google Cloud Platform is an area where we will start moving some of our applications, going back into the applications and re-coding them to be compatible or ready to be moved to a serverless framework. That’s next up, and it’s set to reduce our costs further still.”
Founded in July 2012, Konga is a Nigerian ecommerce company providing direct online retail and a third-party marketplace with over 10,000 vendors.