ClapDB

Frankly, Your Business Doesn't Deserve to Use Servers

Leo

Nowadays, whether it’s on the internet or intranet, 99.99% of services run on servers even with no load. The experience and stability improvements are negligible compared to the waste.

In our previous articles, “Native in Name, Exclusive in Nature: Say No to Stateful Services in the Cloud” and “Cloud is a New Computer”, we repeatedly mentioned that the advantage of the cloud lies in its elasticity, best demonstrated by serverless functions. Let’s discuss why using a serverless tech stack can greatly reduce waste and complexity.

The Challenge of Business Fluctuations

Almost all businesses have peaks and troughs. The chart below shows the PV changes of an internet business in a day. The peak is almost 10 times the trough. Planning capacity based on the peak will waste a lot of resources.

Daily PV traffic chart

Finer Time Scale Fluctuations

Even zooming into a 30-minute segment, the workload isn’t stable.

Half of a Hour PV traffic chart

As PV fluctuates wildly, how often are the resources planned for the peak actually used?

Cost Advantage of Serverless

Here’s a direct cost comparison:

AWS Lambda vs. AWS EC2 Costs

Using the AWS Mumbai Region prices:

ResourceLambdaC5.4xlarge EC2
CPU2vCPU16vCPU
Memory2G32GiB
Local Storage512M0
Network0.6Gbps10Gbps
Price0.0000000333 USD/ms0.68 USD/h

Using memory as a benchmark, 16 Lambda instances (with double the CPU) cost 2.82 times more than an EC2 instance. If your service is active for less than 8.5 hours a day, serverless is cheaper. Most peak loads last only a few minutes or an hour at most, so using serverless can drastically cut your bill.

Serverless KO Service in billings

Operational Costs: Serverless vs. Service

Service Operational Costs

In the past 20 years, maintaining a reliable online cluster involved extensive work

Serverless Operational Costs

Serverless reduces this to just managing configurations and monitoring function performance logs. Serverless eliminates services; as long as the startup speed is acceptable and the resource pool is sufficient, CI/CD is simplified. Serverless functions are isolated, making capacity planning and performance monitoring easier.

Development Costs: Serverless vs. Service

Service Development Complexity

Microservice development involves

Serverless Simplification

New Issues with Serverless

Complexity Shift

Business complexity doesn’t disappear with any tech stack, but serverless reduces the complexity inherent in service-oriented tech stacks over the past 20 years. Serverless avoids state management tricks, drastically reducing complexity.

Future Outlook

Serverless offers the greatest advantage and flexibility in cloud computing. Although not all existing codes can be directly migrated, its natural advantages make it a focus for many vendors. The future is promising.

Current State of Serverless Tech Stack

Despite being heavily invested by multiple cloud vendors, many user codes are still in traditional architectures. Front-end tech stacks like Vercel and Cloudflare offer serverless infrastructure, and AWS Lambda leads in cold start speed.

Conclusion

Wondering if serverless is mature? Our site and ClapDB are entirely built on serverless tech. Experience the magic of serverless with low cost and excellent performance. Welcome to the Serverless era.

← Back to Blog