Skip to content

Cloud Native

homepage-banner

Introduction

Cloud native computing is a modern approach to building, deploying, and running applications that leverages the advantages of cloud computing. Cloud native applications are designed to be scalable, resilient, and dynamically managed, making them well-suited for the cloud environment.

Advantages of Cloud Native Computing

  • Scalability: Cloud native applications are designed to scale horizontally, allowing them to dynamically allocate and manage resources as demand increases or decreases. This enables organizations to respond quickly to changes in demand and to handle peak traffic loads.
  • Resilience: Cloud native applications are built to be resilient, with automatic failover and self-healing capabilities. This ensures that applications remain available and accessible, even in the event of a failure.
  • Continuous Deployment and Delivery: Cloud native applications are designed for continuous deployment and delivery, enabling organizations to rapidly release new features and updates.
  • Microservices Architecture: Cloud native applications use a microservices architecture, which divides an application into smaller, independent services that can be managed and deployed independently. This makes it easier to manage complex applications and to respond to changes in demand.

Disadvantages of Cloud Native Computing

  • Complexity: Cloud native applications can be more complex to design, develop, and deploy compared to traditional applications, as they require a deeper understanding of cloud computing concepts and technologies.
  • Integration: Integrating cloud native applications with legacy systems can be challenging, as they may require significant modifications to existing processes and technologies.
  • Skills Gap: The rapid adoption of cloud native computing has created a skills gap, as organizations struggle to find developers with the right skills and experience to design, develop, and deploy cloud native applications.

Twelve Factors of Cloud Native

12-Factor-app

“The Twelve-Factor App” was proposed by Adam Wiggins, the founder of Heroku in 2012. The characteristics mentioned in the twelve factors are not specific to cloud providers, platforms, or languages. These factors represent a set of guidelines or best practices for portable elastic applications (especially “software as a service” applications) that are thriving in the cloud environment.

  1. Codebase: One codebase, many deploys
  2. Dependencies: Explicitly declare dependencies
  3. Configuration: Store configuration in the environment
  4. Backing services: Treat backing services as attached resources
  5. Build, release, run: Strictly separate build and run stages
  6. Processes: Execute the app as one or more stateless processes
  7. Port binding: Export services via port binding
  8. Concurrency: Scale out via the process model
  9. Disposability: Maximize robustness with fast startup and graceful shutdown
  10. Dev/prod parity: Keep development, staging, and production as similar as possible
  11. Logs: Treat logs as event streams
  12. Admin processes: Run admin/management tasks as one-off processes

Advanced Twelve Factors

After the release of the twelve factors, Kevin Hoffman, who works at Pivotal, published the book “Beyond the Twelve-Factor App”, which not only elaborated on the original twelve factors in more detail but also added three new factors.

  1. API First: Prioritize API design like a contract, which should be changed as little as possible once it takes effect. If it is modified after being put into use, its impact may be difficult to control and may affect many external systems.
  2. Telemetry: For applications deployed in the cloud environment, their system environment is closed and isolated. When problems occur, you should not log in to problematic physical servers to observe and collect the application’s status.
  3. Authentication and Authorization: It is dangerous to completely leave security issues to the cloud platform, so it is recommended to use more complete security mechanisms such as OAuth2 authentication and RBAC authorization.

Cloud Native Design Pattern

Cloud-Design-Patterns

1. Availability

Availability is the proportion of time that the system is functional and working, usually measured as a percentage of uptime. It can be affected by system errors, infrastructure problems, malicious attacks, and system load. Cloud applications typically provide users with a service level agreement (SLA), so applications must be designed to maximize availability.

2. Design and Implementation

Good design encompasses factors such as consistency and coherence in component design and deployment, maintainability to simplify administration and development, and reusability to allow components and subsystems to be used in other applications and scenarios.

Decisions made during the design and implementation phase have a huge impact on the quality and total cost of ownership of cloud-hosted applications and services.

3. Performance & Scalability

Performance is an indication of the system’s responsiveness to execute any action within a given time interval, while scalability is the ability of a system to handle increases in load without impacting performance or to readily increase available resources.

Cloud applications typically encounter variable workloads and peaks in activity. Instead, applications should be able to scale out within limits to meet peaks in demand and scale in when demand decreases. Scalability concerns not just compute instances, but other elements such as data storage and messaging infrastructure.

4. Management and Monitoring

Cloud applications run in a remote datacenter where you may not have full control of the infrastructure or operating system. This can make management and monitoring more difficult than an on-premises deployment.

Applications must expose runtime information that administrators and operators can use to manage and monitor the system, as well as support changing business requirements and customization without requiring the application to be stopped or redeployed.

5. Data Management

Data management is a key element of cloud applications and influences most quality attributes. Data is typically hosted in different locations and across multiple servers for reasons such as performance, scalability, or availability, and this can present a range of challenges. For example, data consistency must be maintained, and data will typically need to be synchronized across different locations.

6. Security

Security is the capability of a system to prevent malicious or accidental actions outside of the designed usage and to prevent disclosure or loss of information. Cloud applications are exposed on the Internet outside trusted on-premises boundaries, are often open to the public, and may serve untrusted users. Applications must be designed and deployed in a way that protects them from malicious attacks, restricts access to only approved users, and protects sensitive data.

7. Messaging

The distributed nature of cloud applications requires a messaging infrastructure that connects the components and services, ideally in a loosely coupled manner in order to maximize scalability. Asynchronous messaging is widely used and provides many benefits, but also brings challenges such as the ordering of messages, poison message management, idempotency, and more.

8. Resiliency

Resiliency is the ability of a system to gracefully handle and recover from failures. The nature of cloud hosting, where applications are often multi-tenant, use shared platform services, compete for resources and bandwidth, communicate over the Internet, and run on commodity hardware, means there is an increased likelihood that both transient and more permanent faults will arise. Detecting failures and recovering quickly and efficiently is necessary to maintain resiliency.

CDP.png

cloud-design-pattern.jpg

Reference

  • https://12factor.net
  • Future Architecture: From Service to Cloud Native
  • Cloud Native Architecture Advanced Practice
  • Scalable Architecture (2nd Edition): High Availability and Risk Management in Cloud Environments
  • https://zhuanlan.zhihu.com/p/243404169
  • https://architecturenotes.co/12-factor-app-revisited/
  • https://landscape.cncf.io/
  • https://www.ijert.org/research/introduction-to-cloud-design-patterns-IJERTV9IS080171.pdf
  • https://medium.com/@maheshsonaiya/cloud-design-patterns-cac98e878698
  • https://learn.microsoft.com/en-us/azure/architecture/patterns/
  • https://landscape.cncf.io/
  • https://www.slideshare.net/slideshow/cloud-design-pattern-using-azure/152725300
Leave Your Message