Slide deck for the APIDays Singapore talk on Modular Architecture for Resilience and Adaptability. https://www.apidays.global/singapore/
The session covered different means by which we can architect modern applications and services for resilience and adaptability
4. A Tale of an Airline booking system – Feb 2022
Issues with Airline booking
✓ Mobile app: unable to search
flights, unable to manage booking
✓ Website: search for flights, book
tickets, manage booking
✓ Different error messages on Mobile
app and on website for same action
Possible causes
✓ Not using APIs: different teams,
codebases, lack of collaboration
5. A Tale of an Airline booking system – March 2023
96 hours for password reset
Attribution: Twitter icons created by Pixel perfect - Flaticon
6. Drawbacks of legacy systems
“We Didn’t Do
Anything Wrong
But Somehow,
We Lost! “
7. Codebase
One codebase tracked in
version control, many
deploys
Dependencies
Explicitly declare and isolate
dependencies
Config
Store config in the
environment
Backing services
Treat backing services as
attached resources
Build, Release and Run
Strictly separate build and
run stages
Processes
Execute the app as one or
more stateless processes
Port Binding
Expose services via port
binding
Concurrency
Scale out via process-model
Disposability
Maximize robustness with
fast startup and graceful
shutdown
Dev/Prod Parity
Keep development, staging
and production as similar as
possible
Logs
Treat Logs as event streams
Admin Processes
Run admin/management
tasks as one-off processes
12 Factor Apps
8. Codebase
One codebase tracked in
version control, many
deploys
Dependencies
Explicitly declare and isolate
dependencies
Config
Store config in the
environment
Backing services
Treat backing services as
attached resources
Build, Release and Run
Strictly separate build and
run stages
Processes
Execute the app as one or
more stateless processes
Port Binding
Expose services via port
binding
Concurrency
Scale out via process-model
Disposability
Maximize robustness with
fast startup and graceful
shutdown
Dev/Prod Parity
Keep development, staging
and production as similar as
possible
Logs
Treat Logs as event streams
Admin Processes
Run admin/management
tasks as one-off processes
15 Factor Apps
API First
Define service contract
Telemetry
Monitor process
performance
Authentication
Secure applications across
hardware, network, and
software layers
9. API First
Define Service Contract
• Well suited for cloud development
• Allows rapid prototyping
• Support a services ecosystem
• Facilitates automated deployment testing and continuous delivery
pipelines
• Enables consumers and service developers to work in parallel
• Helps to avoid bottlenecks and facilitates virtualization of APIs by
allowing consumers to run tests against the mocks
10. Telemetry
Monitor process performance
• Categories of data
• Application Performance Monitoring (APM)
• Domain-specific telemetry
• Health and System logs
• Helps to scale, self-heal and manage alerts for
end users and platform operators
13. Loosely coupled application design
Microservices, Event Driven
Architecture
Automation
IaC using Declarative methods with
Terraform, Ansible, Pulami etc.
Things to Improve Resiliency and Adaptability
Chaos testing
Deliberately introduce faults to test for
resiliency
Serverless
Automatically provision, scale and
manage resources
Observability
Collect and analyse data to identify
issues and potential improvements
Progressive Delivery
• Blue Green Deployment
• Canary Release
• Dark launches
• Phased alfa, beta, and gamma
releases
14. Evolution of API Architecture
https://www.linkedin.com/posts/bytebytego_systemdesign-coding-interviewtips-activity-7051425568013045760-u70N