explain Azure microservices
Building applications on the Microsoft Azure cloud platform
-microservices architectural style
-application broken into small, independent and loosely coupled services
-each service responsible for a specific business function
-each service can be developed, deployed, and scaled independently
what is a docker file?
static representation of application
instructions for docker engine to execute and create a static image of application
prebuilt package
explain Decoupled Services
Each service is a separate codebase managed by a small, focused team.
Independent Deployment
Teams can update and deploy existing services without rebuilding or redeploying the entire application.
Communication via APIs
Microservices communicate with each other through well-defined APIs, typically using lightweight protocols like HTTP/REST
Data Isolation
Each microservice is responsible for:
- persisting its own data
- often using a polyglot persistence approach (mixing SQL and NoSQL databases as needed)
- polyglot persistence avoids hidden dependencies.
Fault Isolation
If one microservice fails, it does not disrupt the entire application, as the other services can continue to function.
Azure Services for Microservices advantages
Azure provides several options for hosting and orchestrating microservices, allowing developers to choose the approach that best fits their needs.
IaaS PaaS SaaS
Azure Kubernetes Service (AKS)
A managed Kubernetes service that is a common choice for orchestrating containerized microservices. AKS handles the complexities of deploying, scaling, and managing Docker containers across a cluster.
Azure Container Apps
A managed, serverless platform built on Kubernetes that simplifies the deployment and management of microservices.
Ideal for scenarios:
- where direct access to the underlying Kubernetes APIs is not needed
- provides built-in scaling and service discovery features.
Azure Service Fabric
A distributed systems platform that provides extensive control over the infrastructure and offers APIs for building highly reliable, stateful microservices.
Azure Functions
A serverless compute service that allows running small, event-triggered microservices without managing infrastructure. You only pay for the time your code runs, making it cost-effective for event-driven architectures.
A full microservices architecture on Azure also utilizes supporting services for management and operations. What are some supporting services?
API Gateway
Message Brokers
Observability Tools
CI/CD Pipelines
API Gateway
API Gateway: Manages ingress traffic, routing requests to the appropriate backend services and handling cross-cutting concerns like authentication and load balancing. Azure API Management can fulfill this role.
Message Brokers
Services like Azure Service Bus and Azure Event Grid enable efficient asynchronous communication between services.
Observability Tools
Azure Monitor and Application Insights help in centralized logging, monitoring, and distributed tracing to maintain system health and performance.
CI/CD Pipelines
Azure Pipelines (part of Azure DevOps) or GitHub Actions automate the build, test, and deployment processes for individual services.
Orchestrator
manage applications in containers in a cluster???
example: Kubernetes
docker compose
full featured orchestrator???
docker compose file
instructions for building and running multiple files, config file ???
how do you write instructions in the compose file?
specify port
how do you build a docker image and how do you communicate with microservice?
???
How do you deploy your application?
kubernetes architecture
Orchestrator platform
Abstracts your infrastructure
looks at desired vs actual state of application
master node/worker node
API server control manager, scheduler