Cloud computing has changed the way businesses operate. With the advent of cloud native technology, businesses can now enjoy scalable, flexible, and cost-effective solutions to support their growth and innovation. However, to fully take advantage of the benefits of cloud computing, it is important to understand cloud native guiding principles and how to implement them. In this blog post, we will discuss the 12 factor app, telemetry, authentication and authorization in detail.
12 factors are listed below.
- Single Code Base
- One codebase tracked in revision control, many deploys. Code base should contain all the possible configuration & code. Multiple deployments should give the same result.
- if there are multiple entry points to an application then it can be split into multiple code bases.
- if needed code base can be shared by splitting into dependencies.
- API first approach(Contract driven approach) should be used while developing the code base.
- Dependencies - Explicitly declare and Isolate dependencies
- Cloud native application can't assume that all dependencies will be available in a single shared space. Dependency needs to be isolated.
- Config - Store config in the environment
- Same variable across multiple environments should be considered part of code not configuration.
- Externalize your configuration per environment . it should be versioned and auditable.
- Backing Services - Treat backing services as attached resources
- DB, Cache services should be able to attach and detach from the application at will.
- Circuit Breaker pattern - well defined communication paradigm where application will stop communicating with the backing services in case of failure or no response.
- Build Release Run - Strictly separate build and run stages.
- Build - Converts the code into executable.
- Release - Create artifacts from the unique commit id & configuration.
- Run - Environment able to deploy the artifacts and run in the environment.
- Stateless Processes - Stateless processes and share nothing pattern.
- Processes don't share information between them and the application don't store information after the response is sent to the consumer after processing the request.
- Any data that needs to be persisted should be part of the backing service instead of the application.
- Port Binding - Export services via Port binding
- Service or application needs to be exposed to external world via port binding.
- Concurrency - Scale out via the process model
- Design application in such a way where web requests are handled by web app and other application requests are handled by a different app. Designing such way will facilitate horizontal scalability.
- Disposability - Maximize robustness with fast startup and graceful shutdown
- Application should be able to start quickly and should shutdown gracefully in case of failures.
- Dev/Prod Parity - Dev, UAT, Staging and Production environment should be as same as possible.
- Continuous deployment should help in keeping them as close as possible.
- Logs - Treat logs as event streams
- Logs are the stream of aggregated, time-ordered events collected from the output streams of all running processes and backing services.
- Admin Processes - Run Admin process as one off process
- Run admin process similar to application process in an one off process.
- Telemetry - Take specific measurements of something and then to transmit those measurements elsewhere using Radio.
- Following categories of data needs to be measured.
- Application performance Monitoring - How many requests are being handled by the application per second.
- Domain Specific Telemetry - Number of orders being processed in an Order Management system.
- Health & System logs - Provide events to measure start, shut down, request tracing and periodic health checks.
- Authorization & Authentication - Security should never be afterthought.
- Security of the application should be part of the design.
- Secure all endpoints using RBAC - Role based access control.
- Every request of the application should have the role and that role should dictate if the consumer has access to the data.
- With tools like OAuth2 , Openid and other authentication libraries the authentication and authorization functionality should be baked into the cloud native application on day1.
- Conclusion - Cloud native computing offers numerous benefits to businesses, but to fully take advantage of these benefits, it is important to understand and implement cloud native guiding principles. The 12 Factor App, telemetry, authentication, and authorization are key components of cloud native computing that can help businesses to optimize their applications and infrastructure, improve performance, and ensure security and compliance. By implementing these principles, businesses can take full advantage of the benefits of cloud computing and drive growth and innovation.
References -
OpenAI - Conclusion and Definition of cloud computing was generated using ChatGPT
Comments
Post a Comment