Server vs Serverless architecture

Mansi Manhas
2 min readDec 26, 2023

--

Photo by Pixabay

In server-based architecture —

applications run on servers that developers provision and manage themselves. You are responsible for maintaining and scaling the servers to handle varying workloads.

In Serverless architecture —

the cloud providers dynamically manage the infrastructure, and we need to pay only for the actual use of the resources. In this architecture, we often break the application into smaller functions that are executed in response to events. For example: AWS Lambda Functions, Azure Functions, Google Cloud Functions, etc.

Advantages:

  • designed for automatic scaling
  • more cost-effective as you pay for the actual use rather than maintaining idle resources

Examples of using combinations of both approaches —

User Authentication — The authentication service might be implemented as a serverless function using a service like AWS Cognito or Firebase Authentication, while other microservices handling complex computations or data processing could run on traditional servers.

Image Processing— A server-based application might handle the core functionality, but use serverless functions to process images uploaded by users. AWS Lambda or Azure Functions could be used to resize or analyze images in response to events triggered by uploads.

The choice between server-based and serverless architecture depends on the specific requirements and constraints of the application, as well as factors such as cost, scalability, and development speed. Many modern applications also use a combination of both approaches, leveraging the strengths of each where appropriate.

--

--

Mansi Manhas

Tech enthusiast, wanderlust, coffee addict! ☕️ Senior Software Engineer, enhancing product experiences. https://www.linkedin.com/in/mansimanhas/