AWS Cloud Developer: Microservices - Basics Flashcards
Microservices
Independently-deployed services that communicate with one another through networks
Monoliths
Self-contained applications that are deployed as one unit.
Microservices vs Monolith Architecture
Monolith
Utilize a powerful, more costly machine
Codebase is centralized and easy manage
Code is easily shared across the project
Scoped for worst-case usage across all parts of the application
Microservice
Utilize smaller, cost-effective machines for what we need
Flexibility to implement logic in a way that makes sense for the team and business
Lean to be targeting a specific business purpose
Interfaces set up for building out other applications
Try not to overcommit and pay for resources that aren’t needed
Deploying code
The act of releasing code changes to an environment
3 Main consideration when deploying code
- Down time
- Potential bugs
- Downstream effects
The business value of microservices architecture
Business Requirements Drive Teams
Teams can be organized around business needs and have a clearer focus on customer requirements. There is clear ownership on who owns what.
Teams Can Work in Parallel
Since projects are deployed independently, teams can develop and deploy code without stepping on each others’ toes.
Flexibility in Technology
We are not limited to a certain technology and can choose what may work best for the business need or team.
3 things to consider when deciding on Microservices Architecture vs Monolithic architecture
System Complexity
Rather than deploying a single application, we would be deploying multiple modules separately. There is more overhead in setting up projects.
Network Latency
By introducing a network between modules, we have increased latency in application performance and will find it harder to debug our application.
Difficulty with Debugging
We can no longer rely on a stack trace or tools that can help us pinpoint where a bug is. We may end up relying on logging to find causes of issues.