Skip to content

Why Serverless

What is Serverless?

Serverless computing is a cloud computing execution model where the cloud provider dynamically manages the allocation and provisioning of servers. AWS offers a range of serverless services such as AWS Lambda, AWS AppSync, and Amazon EventBridge, which allow developers to build and run applications without having to manage infrastructure.

Benefits of Serverless on AWS

  1. Scalability:

    • Automatic Scaling: AWS serverless services automatically scale to handle the demands of your application. AWS Lambda, for instance, scales in response to incoming traffic, ensuring consistent performance during peak loads without manual intervention.
  2. Cost Efficiency:

    • Pay-as-You-Go: With serverless, you only pay for the compute time you consume. AWS charges you based on the number of requests and the duration your code runs, which can significantly reduce costs compared to traditional server-based architectures.
  3. Reduced Operational Overhead:

    • No Server Management: AWS handles the infrastructure management, including server maintenance, patching, and scaling. This allows your development team to focus on writing code and delivering features rather than managing servers.
  4. Enhanced Agility:

    • Faster Deployment: Serverless architecture enables rapid development and deployment cycles. AWS services such as Lambda and AppSync integrate seamlessly with CI/CD pipelines, allowing for continuous integration and delivery.
  5. Event-Driven Design:

    • Integration with AWS Services: AWS serverless services are designed to work well together. For example, you can use Amazon EventBridge to trigger AWS Lambda functions, enabling an event-driven architecture that is highly responsive to changes and real-time data.
  6. High Availability and Reliability:

    • Built-in Fault Tolerance: AWS serverless services offer built-in fault tolerance and availability. AWS Lambda functions are replicated across multiple availability zones, ensuring that your application remains resilient and highly available.

Why Serverless Fits Our Architecture

  1. Alignment with CQRS and Event Sourcing:

    • Our choice of CQRS and event sourcing patterns fits perfectly with serverless architecture. AWS Lambda functions handle commands (writes) and queries (reads) efficiently, while services like EventBridge facilitate event-driven communication.
  2. Seamless API Management:

    • Using AWS AppSync for our GraphQL API management aligns with our need for flexible and scalable API solutions. AppSync simplifies the creation and management of GraphQL APIs, allowing us to focus on delivering business value.
  3. Optimized for Domain Experts:

    • Serverless architecture abstracts away infrastructure complexities, allowing domain experts to focus on system design and business logic. This aligns with our goal of enabling domain experts to contribute directly to the system without needing deep technical expertise in infrastructure management.
    • While serverless icreases configuration complexity, this is largly abstracted away by the Tracepaper modeling concepts.
  4. Optimized TCO:

  5. By only paying for what you use and eliminating the need for server maintenance, the Total Cost of Ownership (TCO) is significantly reduced, making it a financially efficient option.

Conclusion

Choosing a serverless architecture on AWS provides us with scalability, cost efficiency, reduced operational overhead, and enhanced agility. These benefits align perfectly with our design patterns (CQRS and event sourcing) and our goal of empowering domain experts to focus on delivering business value. AWS's comprehensive suite of serverless services ensures that our applications are robust, scalable, and maintainable, supporting our long-term objectives.