Guidance for Building Persistent and Resilient Event-Driven Patterns for Payroll Systems on AWS
Overview
Please note: [Disclaimer]
How it works
This architecture diagram shows how to implement an accurate, resilient, serverless, and event-driven payroll processing system with exactly-once processing requirements and failure-handling patterns.
Well-Architected Pillars
The architecture diagram above is an example of a Solution created with Well-Architected best practices in mind. To be fully Well-Architected, you should follow as many Well-Architected best practices as possible.
Operational Excellence
Event-driven systems are asynchronous in nature and use decoupled microservices that can scale and fail independently. This Guidance is designed to handle planned and unplanned events. For example, EventBridge and API Gateway facilitate both scheduled requests for planning activities and one-time requests for unplanned activities. Additionally, the use of serverless services enables microservices to scale dynamically as the business scales. Amazon SQS, Lambda, DynamoDB, and Step Functions (which provide distributed map and lifecycle hooks) can scale while maintaining a durable orchestrated workflow. The system maintains idempotency, allowing repeated processing of the same operation without unintended side effects.
Security
This Guidance uses multiple layers of security to protect data as it moves across systems and from public to private resources. It encrypts network traffic using TLS, and API Gateway uses authentication and authorization services to protect backend services from untrusted sources. Additionally, Shield provides DDoS protection, and AWS WAF provides conditional access policies that control access to protected content.
Reliability
In distributed systems, each service can scale independently based on variable incoming requests or events, but this can lead to unpredictable volumes of traffic at individual services because each component accepts, completes, and hands off work at a different rate. This Guidance uses Amazon SQS to decouple services within a distributed system and provide a durable queue, which buffers downstream services from spikes in volume until they are able to process the work. DynamoDB integrates and scales alongside serverless systems and provides system idempotency by tracking the state of work as it moves through the distributed system.
Performance Efficiency
This Guidance uses serverless services, removing the need for you to manually provision servers to handle peak volume. Serverless technologies like Step Functions, Amazon SQS, Lambda, EventBridge, and API Gateway scale alongside request volume, often within seconds, and efficiently scale up and down to protect your solution against the under- or overprovisioning of resources.
Cost Optimization
Serverless technologies like Lambda, Amazon SQS, and API Gateway use a pay-for-use billing model, and they elastically scale resources up and down alongside events. This removes the operational overhead of capacity management and patching and optimizes resource allocation to match the load. EventBridge and Lambda also enable an event-driven architecture that removes the need to keep resources continuously allocated to poll or track work as it passes between services. Additionally, event-driven components are loosely coupled, promoting greater flexibility and extensibility of applications and thereby improving your developers’ operational efficiency.
Sustainability
Step Functions, Amazon SQS, Lambda, EventBridge, API Gateway, and DynamoDB dynamically scale alongside requests for optimal provisioning based on workload volume. As a result, you don’t need to overprovision services to meet peak demand. Backed by loosely coupled microservices that scale independently, this event-driven system can allocate resources to the specific service that needs to process the event. Additionally, the AWS US East and West Regions use 100 percent renewable energy to power their compute resources.
Disclaimer
Did you find what you were looking for today?
Let us know so we can improve the quality of the content on our pages