Cloud Computing 23 min read

Why Microservices Struggle and How Serverless Offers a Better Path

This article examines the lingering challenges of microservice architecture—such as service granularity, development complexity, infrastructure management, and cost—while introducing Serverless computing, its definition, key technologies, and the technical and operational advantages that make it a compelling evolution for modern cloud applications.

Programmer DD
Programmer DD
Programmer DD
Why Microservices Struggle and How Serverless Offers a Better Path

Microservice Challenges

Although the microservice ecosystem and practices are mature, microservices still face new challenges in architecture, development, and infrastructure.

1. Service granularity remains large – For example, a user‑management microservice provides registration, login, and logout APIs. The QPS for logout and registration differ greatly, leading to divergent scaling needs. Further splitting improves scalability but increases the number of services and the burden on infrastructure management.

User management microservice architecture
User management microservice architecture

2. Development remains difficult – Java microservice development requires mastering a complex stack, including governance components and container‑based infrastructure, which adds to development difficulty.

Java microservice development stack
Java microservice development stack

3. Infrastructure management, high availability, and elasticity are hard to guarantee – Containers and Kubernetes improve automation, but ensuring high availability and elasticity still demands skilled ops teams. Even after moving to the cloud, virtual machines must be maintained (security patches, image updates, scaling).

Infrastructure team managing virtual machines
Infrastructure team managing virtual machines

From on‑premise to public cloud, VM availability often drops (e.g., a single VM may only offer 95% uptime). Operators must rely on cloud‑side tools to maintain high availability, which remains challenging and heavily dependent on operator expertise.

Maintaining Kubernetes clusters and other cloud‑native tools adds further difficulty. Short‑lived function instances also create connection‑burst issues with backend services like databases.

4. Infrastructure cost remains high – Each microservice requires redundancy for high availability, leading to exponential growth in infrastructure resources and cost, while cloud billing remains based on resource size and time.

What Is Serverless

In 2012, Ken, then VP of Iron.io, coined “Serverless,” predicting a shift away from server‑centric computing. AWS launched Lambda in 2014, offering a fully managed function‑as‑a‑service (FaaS) with pay‑per‑use billing. Since then, major cloud providers (Google, Huawei, etc.) have introduced Serverless offerings.

AWS Serverless overview
AWS Serverless overview
Google Serverless overview
Google Serverless overview
Huawei AppGallery Connect Serverless overview
Huawei AppGallery Connect Serverless overview

According to Wikipedia, Serverless is a cloud execution model where providers allocate resources on demand, developers do not manage servers, and billing is based on actual usage. CNCF adds that Serverless enables fine‑grained deployment of functions that scale automatically.

Cloud providers allocate compute resources on demand, removing the need for developers to manage containers, VMs, or physical servers.

Serverless computing is stateless and short‑lived, with results stored externally.

Resources are not allocated when an application is idle.

Billing measures actual resource consumption.

Serverless services are mainly divided into Function as a Service (FaaS) and Backend as a Service (BaaS).

FaaS : Event‑driven, stateless functions run in temporary containers managed entirely by the cloud provider. Scaling occurs at the function level, reducing the operational burden.

Comparison of FaaS, IaaS, and PaaS
Comparison of FaaS, IaaS, and PaaS

BaaS : Fully managed third‑party services (e.g., NoSQL databases, authentication, message queues) accessed via APIs, appearing serverless to developers.

Serverless Key Technologies

A typical Serverless architecture includes:

Event Sources – producers of events (HTTP requests, message queues, etc.).

Triggers – RESTful endpoints that map events to functions.

FaaS Controller – manages function lifecycle, scaling instances from 0 to N.

Function Instances – runtime environments containing code, language runtimes, and context.

Programming Model – defines function signatures and handling of inputs/outputs.

BaaS Platform – provides stateful services (e.g., databases) accessed by functions.

Typical Serverless system architecture
Typical Serverless system architecture

Key technical requirements include:

Friendly programming model that abstracts concurrency and supports orchestration.

Rapid scaling from 0 to N within seconds or milliseconds.

Reduced cold‑start latency.

Efficient, reliable BaaS connectivity, handling high‑concurrency connection bursts.

Strong security isolation, often using lightweight virtualization.

Core Changes Brought by Serverless

Serverless delivers full‑managed infrastructure and innovative billing, while introducing architectural, development, and operational innovations.

Technical Innovations

1. Extension of event‑driven architecture – Serverless simplifies event‑driven applications; functions replace microservice APIs, reducing the number of services while maintaining scalability.

It also enables true 3‑tier deployments where the presentation layer can be hosted on object storage, the business layer on FaaS, and the data layer on cloud databases.

Serverless 3‑tier pet store application
Serverless 3‑tier pet store application

2. Simplified development model – Developers only need basic language knowledge, a function programming framework, and BaaS SDKs, avoiding the complexity of Spring/SpringBoot and container orchestration.

Comparison of Java microservice and function development
Comparison of Java microservice and function development

Functions handle high concurrency without developers needing to master Java concurrency primitives.

Serverless supports high‑concurrency applications
Serverless supports high‑concurrency applications

Data binding features (e.g., Azure Functions) further reduce cognitive load.

3. Immutable infrastructure best practice – Deployments are code‑centric; containers and images are abstracted away. Instances are created on demand and reclaimed after use, minimizing environment‑drift errors. Scaling is automatic and instantaneous, and built‑in monitoring, logging, and tracing reduce operational overhead.

Other Advantages

Accelerated delivery: Smaller codebases and tests enable faster CI/CD pipelines.

Full‑stack team efficiency: Unified language stacks (Node.js, Swift, etc.) allow a single developer to handle both front‑end and back‑end, improving team productivity.

Differences Between Serverless and Microservices

Table‑style comparisons (omitted) show that Serverless reduces development effort, shortens time‑to‑market, and improves operational stability compared to traditional microservices.

Differences between microservices and Serverless development
Differences between microservices and Serverless development
Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

FaaSServerlessarchitectureBaaS
Programmer DD
Written by

Programmer DD

A tinkering programmer and author of "Spring Cloud Microservices in Action"

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.