Cloud to baremetal

Jahnavi Katikitala
3 min readNov 2, 2023

--

The tweet below by the CTO of a startup left tech enthusiasts pondering ‘why?’

Dukaan is an e-commerce startup that’s assisting local neighborhood stores in India to establish an online presence. Dukaan was born during the pandemic when the founders recognized that products like “Shopify” and “WooCommerce” were not suitable for shopkeepers with limited to NO tech knowledge to sell their products online.

So, why did they move out of cloud?

Deep customer empathy is at the core of Dukaan’s approach. They initially adopted a lean startup methodology, rapidly launching their Minimum Viable Product (MVP) just two days after conceiving the idea. As their customer base expanded, they continued to develop new features and products.

However, as they progressed, they faced a significant challenge — the monthly cloud costs were skyrocketing (running at $90K). Recognizing the price-sensitive nature of the Indian market, Dukaan realized that their customers wouldn’t be able to bear the burden of high service fees. So, they embarked on a mission to find ways to reduce these costs and make their services more affordable.

Despite having secured a significant amount of investment capital, Dukaan made a deliberate choice to exercise financial prudence. Their decision was guided by a long-term vision for the company, prioritizing sustainability and cost-efficiency.

Cloud computing enables scalability and high availability but may pose latency and security concerns. Switching to, bare-metal servers offer high performance and control but comes with upfront costs and maintenance overhead.

Given Dukaan’s current customer base(~ 150,000 customers) and traffic, the decision to use bare-metal servers became more cost-effective. To manage maintenance, they’ve partnered with external firms that handle hosting of bare metal infrastructure across different regions. In making this transition, Dukaan prioritized high performance over high availability. As a result, their monthly costs decreased significantly, from $90,000 on the cloud to $1,500 with bare metal, and their IOPS (Input/Output Operations Per Second) saw a substantial improvement due to this shift.

Caveats?

Their database is on-prem but, backups are on cloud (that’s the only cloud cost they pay today).

During downtime: If all the servers across regions are unavailable, it takes roughly ~ 7–30minutes to bring their system back to normal (Point-In-Time-Recovery from their cloud backups).

How do they handle peak traffic (say, if one of the customers of Dukaan goes to Sharktank)?

Dukaan knows the maximum load each server can handle, allowing them to gauge their infrastructure’s capacity accurately.

With proxies in 22 regions worldwide, they have a distributed network that can direct and manage traffic across different server locations. When there is a surge in traffic in one region during its daytime, Dukaan can effectively redirect requests to regions where it’s nighttime, distributing the load and maintaining performance.

Dukaan acknowledges that spinning up an instance in a new region can introduce a lag of approximately 200ms. To mitigate this, they actively monitor traffic patterns and can intelligently route requests, thus optimizing response times.

Would they end up building a data center if they scale enormously down the lane?

Dukaan’s plan is to consider migrating to cloud services if they find it cost-justifiable.

Should all startups adopt this strategy? or Should all startups start with bare metal over cloud?

It depends on the stage of startup, the trade-off’s the startup wants to choose and the startup’s appetite for risk! It’s never a one-size fit all solution!

Data Source: [Arpit Bhayani and Subhash Choudhary]

--

--