What Effect Will RocketMQ Plus Serverless Generate?

  • Cloud-Native and Serverless
  • Knative
  • RocketMQSource
  • Food Delivery Application

Cloud-Native

Serverless

  • Event-driven: Serverless is a fully-managed computing service that is event-driven, for example, by HTTP and pub/sub events.
  • Auto scaling: Resources are allocated to achieve load shifting.
  • Usage-based billing: Traditional services are billed based on the resources used, such as ECS instances and VM specifications. Serverless services are billed based on the usage volume, for example, the number of calls and their duration.
  • Green computing: Resource utilization is maximized to reduce resource waste and ensure energy savings and emissions reduction.

Knative

1. Core Knative Modules

2. Serverless Service Engine — Serving

Serving Application Model

  • Service: Abstracts serverless application orchestration and manages the lifecycle of applications
  • Configuration: Configures the current desired status. Configuration is updated each time Service is updated
  • Revision: Creates a snapshot for version management upon configuration updates
  • Route: Routes requests to Revisions, forwarding different percentages of traffic to different Revisions

3. Event-Driven Framework — Eventing

Broker and Trigger Models in Eventing

Message Queue for Apache RocketMQ

RocketMQSource

Knative + RocketMQ Applications for Food Delivery

  • Food delivery services have prominent peaks and valleys throughout the day.
  • During peak hours, the order quantity is large.

1. Typical Architecture

  • The food delivery system is serverless because it uses Knative technologies and is built on RocketMQ. This greatly reduces server O&M and costs.
  • Elastic Knative can help you easily cope with large resource requirements during breakfast, lunch, and dinner hours.
  • RocketMQ is used for asynchronous decoupling to avoid problems, such as long call processes, and improve system availability.

2. Operations

kubectl apply -f 200-serviceaccount.yaml -f 202-clusterrolebinding.yaml -f 203-secret.yaml -f alirocketmqsource.yaml -f broker.yaml -f ksvc-order-service.yaml -f trigger.yaml
{"orderId":"123214342","orderStatus":"completed","userPhoneNo":"152122131323","prodId":"2141412","prodName":"test","chargeMoney":"30.0","chargeTime":"1584932320","finishTime":"1584932320"}

3. Effect

Other Scenarios

1. Typical Knative + RocketMQ Scenarios — Building a Serverless E-Commerce System

  • Elastic Knative can help you easily cope with large e-commerce promotion activities, such as group buying and the Double 11 Global Shopping Festival.
  • RocketMQ is used for asynchronous decoupling to avoid problems, such as long call processes, and improve system availability.

2. Typical Knative + RocketMQ Scenarios — Building a Monitoring and Alerting Platform

  • Data, such as metrics and logs, is pushed to the Knative service through the RocketMQ cluster.
  • Through data analysis, the Knative service pushes alerts to communication tools, such as DingTalk or Slack.
  • The Knative service can process metrics or logs and push them to a third-party system.

3. Typical Knative + RocketMQ Scenarios — Conversion between Different Data Formats

  • The Knative service processes data logs to generate multiple result derivatives, which can be used in operations, marketing, and sales.
  • The Knative service can convert content from one format to another format, for example, from Microsoft Word to PDF.
  • The Knative service can process primary media files that need to be converted to multiple formats.

Summary

Original Source:

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Alibaba Cloud

Alibaba Cloud

4.97K Followers

Follow me to keep abreast with the latest technology news, industry insights, and developer trends. Alibaba Cloud website:https://www.alibabacloud.com