TAP Article Series-13 | Knative-based TAP Cloud Native Runtime

At present, the cloud native and corresponding ecological development led by CNCF are in full swing. Enterprise IT and R&D departments are making great efforts to deploy, orchestrate and manage the life cycle of microservice applications through K8S, thereby liberating development and operation and maintenance, enabling developers to truly Focus on the design, development and innovation of business code. However, there are huge challenges in the actual implementation process.

The first is the complexity of K8S. When developing, operating and deploying applications, users should at least learn and master the following , and each part will lead to more K8S knowledge points.

In addition, the following practically relevant issues in a production environment are included:

  • How to access the K8S application after deployment? Who to find DNS and load balancing?
  • How to implement flexible deployment modes, such as blue-green, grayscale, A/B testing, and proportional current limiting by microservice version?
  • Capacity planning is always inaccurate, so we have to estimate a high point and leave more buffers . Will there be a problem with the resource utilization rate being too low? But if the estimate is too low and the time is not enough, will the expansion be fast?

Because of the above problems, enterprise users usually encounter a lot of tedious configuration and operation and maintenance work when building a container platform based on open source Kubernetes, and often bring many potential problems due to manual operations.

VMware launched the third-generation cloud native platform Tanzu Application Platform - TAP , which is an enterprise-level PaaS platform solution; and TAP's cloud native application runtime abstraction layer -  Cloud Native Runtimes ( CNR) can help application developers and The efficiency of application operators can effectively solve many problems related to environment configuration and operation and maintenance mentioned at the beginning of this article. Through the automated platform method, the complexity of users can be greatly reduced:  

The red marked part in the figure is C loud Native Runtimes .

As the TAP platform runtime base layer , the current version is version1.2 . Among them, Knative  Runtime and K8S Jobs are production-ready as the core foundation, and Batch  Runtime and Stream  Runtime are planned in the roadmap. CNR itself is released independently and is built into the distribution package included in TAP. Knative is one of the cores of CNR. Let's first introduce serverless computing Serverless and Knative, as well as the integration and enhancement of Cloud  Native  Runtimes on this basis.

Serverless Serverless Computing and Knative

Adding layers of abstraction is one of the classic approaches in the design and planning of large software systems. As shown below, the introduction of the abstraction layer of virtualization- > container- >K8S->Server less provides positive promotion for business, development and operation and maintenance.

Serverless is an architectural concept. Its core idea is to abstract the infrastructure that provides service resources into various services, and provide users with on - demand calls in the form of API interfaces, so as to truly achieve on-demand scaling. The current industry-recognized serverless architecture mainly includes two aspects,  FaaS and BaaS-Backend as a Service:

  1. Function as  a Service

Function-as-a-Service is an event -driven function-managed computing service. With function services, developers only need to write business function code and set the conditions for running, without configuring and managing infrastructure such as servers . Development delivery is more agile and resource utilization is more efficient.

  1. Backend as a  Service _ _ 

The concept of BaaS covers a wide range, covering all third-party services that applications may rely on, such as cloud databases, object storage and other services. Developers integrate the required backend functionality through APIs without having to manage infrastructure such as virtual machines or containers . Most BaaS services are provided by cloud service providers. Currently, common BaaS services include : database management , cloud storage , user authentication , push notifications , remote updates , message queues, etc.

The advantages of the traditional  serverless solution are obvious, but the platform and services are maintained by cloud vendors, which makes the vendor-binding phenomenon of serverless architecture very serious. The following problems currently exist:

  • Lack of uniform standards. Fragmentation is presented, and each has its own implementation.
  • Vendor lock-in. For example, when using  AWS Lambda , you must use  AWS 's  DB, S3 and other products.
  • Application migration or multi-cloud is extremely expensive.

At this time , with the wide application and exploration of K8S , Knative has attracted the attention of domestic and foreign manufacturers. Its positioning is a serverless solution based on  K8S , which aims to standardize  serverless and  simplify learning costs. Knative has now become a CNCF incubation project, and the follow-up ecology and prospects are bound to be broader.

Knative two key components: Serving (service) and E vent ing (event).

Serving : Automatic scaling based on load, including scaling down to zero when there is no load. Allows you to create traffic policies for multiple revision applications, enabling easy routing to target applications by  URL .

Event ing: Makes it easy to produce and consume events. Abstracts out event sourcing and allows operators to use the messaging layer of their choice. It is an implementation of event-driven development.

Core functions and components of Cloud Native Runtimes

The core of Cloud  Native  Runtimes (CNR) is Knative and provides tool integration and capability extension. It provides a Runtime runtime layer, which supports users to use K8 S  Deployment and Service, as well as Knative  Server , Scale From/To Zero, E venting and Streaming, etc.

as the picture shows,

1 ) CN R includes core Knative  Serving , Eventing, and continues to provide Streaming and Batch multiple types of Runtime support;

 2) CNR has many good integrations with Contour, Avi and Tanzu Service Mesh, providing advanced Ingress capabilities (the default installation uses Contour as the Ingress  Controller); 

3) CNR provides Eventing integration to support vSphere  Events , AWS Events , RabbitMQ, Kafka. IMC (InMemoryChannel) is used by default ;

4 ) CNR in TAP provides packaging and deployment through the integration of Carvel and Tanzu Build Service ;

5) Finally, we can see that the bottom layer of CNR is based on  the K8S release version of VMware TKG or other cloud service providers.

 Let's review the main capabilities of Knative Serving and Eventing :

1.Serving : The goal is to provide extended capabilities for Kubernetes for deploying and running serverless workloads. Knative Service manages Routes and Configuration, andRouteis responsible for directing traffic to Revision instances as needed. Scalable-to-zero, request-driven compute runtime.

K native Serving works with Activator and Knative  Pod Autoscaler to complete the ability and control of automatic scaling, scaling from zero and scaling down to zero. For preheating and Graceful  shutdown, window - size has been considered and designed.

2. Eventing: Provides building blocks for consuming and generating events conforming to the CloudEvents specification. It includes abstraction of information flow from event sources and decoupling of delivery through messaging channels powered by pluggable pub/sub broker services

Cloud Native Runtimes Community Influence and Core Values

Cloud Native Runtimes is the commercialized and productized implementation of the open source solution Knative

  • VMware is one of the key founding members of Knative , VMware has been a major contributor
  • VMware R&D team has dedicated full-time staff to support Knative
  • Leadership in the Knative Community
  • 2 of the 5 members of the Knative steering committee are from VMware
    • Brenda Chan and Ville Aikas
  • 2 of the 5 members of the Knative technical oversight committee are from VMware
    • Evan Anderson and Dave Protasowski

The core value of CNR mainly reflects convenience and efficiency from the perspective of developers and operation and maintenance management

Development perspective: greatly improve the efficiency of developing and deploying business logic code

 

Application developers through K8S need to learn to master and manage:

Application developers through CNR /Knative need to learn to master and manage :

Pods

Deployment Process

Rollout Progress

Labels and selectors

Service (networking model)

Ingress

Pods

CNR/Knative Service

Operation and management perspective: CNR optimizes the experience of operation and maintenance and Admin

  • Manage and control infrastructure costs through request-driven autoscaling ;
  • The test deployment of traffic is divided according to the code version of the software program ;
  • Simplified deployment with Carvel ;
  • Integrate Ingress (Contour/Avi/Tanzu service mesh) and Eventing (RabbitMQ, kafka or AWS Events , vSphere Events)
  • Enterprise-grade 7 x24 technical support guarantee

Key Scenarios for Cloud Native Runtimes

1. Automatically publish URL , CNR automatically completes the configuration of DNS and load balancing

The cloud native runtime CNR of the TAP platform automatically generates a Route through Knative Runtime , which can be accessed directly through the domain name, and the status information of the runtime resource objects of the application load can be monitored on the interface . The Source 2 URL is automatically completed, and developers do not need to manage resource objects such as Ingress / Service / Deployment / Label in K8S.

View resource usage and resource object status through the TAP  GUI, and you can understand the relationship from application - > Knative resource object - > K8S resource object at the application level .

2. Realize flexible container application deployment mode, and easily provide traffic distribution and control

The TAP platform CNR includes support for K8S  Runtime and Knative  Runtime, and can be deployed whether it is a microservice, a function application , or an event-driven architecture application . You can :

  • Define and deploy applications directly through K8S's deployment yaml ;
  • You can also create application services through Knative  service;
  • Or TAP's workload to create applications

And using Knative high-level abstractions such as service and revision can achieve zero-downtime deployment ; multi-version deployment; deployment and traffic-related scenarios such as proportional traffic allocation. The following figure shows the set flow ratio and the execution result.

3. Automatic scaling based on resource and actual request load algorithm

In addition to simply scaling up and down through resource usage, such as CPU / MEM, CNR performs automatic scaling through the requested load pressure algorithm. Including: scaling from zero (Scale  From  Zero); scaling to zero (Scale  To  Zero); setting the upper and lower limit parameters of service scaling (for example, configure the number of Pods to at least 1 , min=1 , max =5 ) ; Auto-Scaling et al. And can be observed through the CNR command line or the TAP interface application operation details page.

On the left side of the figure below, the sie ge or hey tool is used to continuously send requests with 200 concurrent requests. In the right window of the figure, you can see the number of Pods in the Deployment of the application tap- tanzu -java-web-app-0006 . Will increase to 1 , 2, 3 Pods depending on the flow pressure . The whole process is completely based on the traffic and Pod status through the algorithm to automatically schedule expansion and contraction; when the traffic transmission stops, the number of Pods will gradually decrease from 3, 2, 1 to zero.

in conclusion

VMware  Cloud  Native  Runtimes is an important basic software in Tanzu's product portfolio and the core cloud-native application runtime foundation of TAP products. The characteristics are summarized as follows:

Outlook and Development

Cloud  Native  Runtimes will accompany the evolution and development of K8S, K native and TAP , and continuously meet the needs of building, running and managing cloud native applications in the enterprise environment.

  • Continuously improve the support and integration of TAP, and better integrate buildservice capabilities;
  • Provide and improve Streaming , Batch and other Runtimes;
  • Support for more types of Event Sources , such as Azure, GCP  Event  Sources;
  • Combined with TAP platform to support Streaming Supply Chain, Batch Supply Chain ;
  •  CNR Routes support based on Tanzu Service  Mesh ; 

Stay tuned and try the latest version of CNR !

refer to

1: Knative community, https://knative.dev/docs/

2:Knative in Action, JACQUES CHESTER

3: Gartner,Innovation Insight for Internal Developer Portals https://tanzu.vmware.com/content/analyst-reports/innovation-insight-for-internal-developer-portals 

4: Cloud Native Runtime Document

https://docs.vmware.com/en/Cloud-Native-Runtimes-for-VMware-Tanzu/1.2/tanzu-cloud-native-runtimes/GUID-cnr-overview.html

5: 13 challenges creating an open, scalable, and secure serverless platform

6: Proposal for Autoscaling of Knative Eventing

7: https://tanzu.vmware.com/content/blog/join-cloud-native-runtimes-vmware-tanzu-serverless-public-beta

Author: Liu Peng

VMware senior cloud native application architect , 20 years of software development design and product management experience. Before VMware/Pivotal, he worked for domestic and foreign IT companies such as IBM China Lab, Oracle, Datang Telecom and Ericsson , engaged in system architecture, product management and research and development of enterprise-level platforms and cloud computing-related software. He has extensive experience in telecommunications, banking, transportation and other industries. He has Spring  Core professional, Kubernetes CKA, AWS  Solution Architect,  CloudFoundry and software architect certifications, and currently focuses on enterprise-level PaaS and container cloud platform products and cloud-native microservice application architecture design.

 

Source|Public Number: VMware Tanzu Cloud Native

{{o.name}}
{{m.name}}

Guess you like

Origin my.oschina.net/u/4238514/blog/5581550