Dry | Jingdong resilient and elastic cloud features practice

Elastically stretchable AS (Auto Scaling) is a Web service, according to your business needs and strategies, to automatically adjust the host cloud computing resources to help ensure that you have the right amount of cloud host instance to process your application load.

Use the AS capacity adjustment, you only need to set in advance the conditions and the expansion of volume reduction conditions, AS will automatically increase when reaching conditions / reduce the number of servers used to maintain performance:

  • As business needs grow seamlessly increase host instance.

  • Automatically reduces the host instance when business requirements to save costs lowered

Product Introduction

Elastically stretchable is an on-demand cloud hosting automatically adjusts the size of the service, the ability to effectively respond to the customer's business situation appears volatility. According to customer business characteristics, using different flex patterns, improve customer service capabilities to reduce operational costs, while fully reflects the cloud computing platform for resilient and flexible.

Terminology

Telescopic Group **: ** telescopic group is following the same rules, a set of cloud host for example of the same scene. Telescopic group defines the maximum number of instances in the cloud host group, and the minimum load balancing instance associated attributes.

** startup configuration: ** startup configuration template is automatically created the cloud server, including the mirror, the cloud server instance specifications, data disk and system disk type and volume, and other keys. You must specify the boot configuration when you create a scalable group, after a launch configuration is created by its properties will not be edited.

** telescopic policy: ** condition telescopic action that is executed. Cloud trigger condition may be monitored or alarm time, action may be added or removed cloud host.

There are two retractable strategy:

  • Timing telescopic policy reaches a fixed point of time, automatically increase or decrease the cloud host example, periodically repeated support.

  • Telescopic cloud-based alarm monitoring metrics (such as CPU, memory, network traffic, etc.), automatically increase or decrease the cloud host instance.

** telescopic Activities: ** telescopic after successful strategy triggered, it will have a retractable activities. Telescopic activity mainly used to describe an example of changes in inner telescopic cloud host group.

** Cooling time: cooling time ** is a telescoping means within the same group, the telescopic activity after a period of a complete locking execution time. Cooling time can be specified in the range of 0-86400 (seconds).

scenes to be used

Web application services : **** web service business logic layer scalable capacity. The client requests such as electricity providers websites, video sites, online education by the number of load balancing application server arrives when business traffic fluctuations are fast, flexible scalable service can be scalable application server based on the request and the amount of load flexibility.

HPC **: ** computing nodes and services scaling capacity. Computing nodes, back-end data processing data of a large distributed computing cluster, the size of the real-time adjustment amount calculated number of clusters server, or the periodic-timer to set the scheduled tasks according to the cluster script execution time, automatically create a script execution before host batches, to ensure the efficient operation of the business.

** Data collection retrieval: ** timeliness traffic capacity scaling. For sending a request, data collection, retrieval service server cluster deployments, for business use elastic stretchable service quickly scaling tasks.

Operating Practices

1, the operation flow:

** Test AZ: ** North China - Beijing - Available Area C

** simulation scenarios: ** 2 Apache servers Web service cluster, front-end distributed by LB do traffic; elastically extensible configuration strategies to achieve a server CPU utilization> Auto 1 expansion server 70%, the average CPU usage <1 server automatically reduced 40%.

2, Test Procedure:

The first step: Log console using the registered cloud account login Jingdong console

Step 2: Create a launch configuration console functions on the left navigation bar, select the "elastic computing" in -> "elastically stretchable" -> "Start Configuration" -> "Create"

Set configuration name, select "private Mirror" ( "private image" by creating good host and deploy cloud applications and complete the configuration of complete production cloud host mirroring) in the "image"; configuration specifications can be adjusted according to the actual situation (CPU , memory, storage, bandwidth); Once created click save.

Step 3: Create arranged telescopic group is automatically created in accordance with the set number of instances after the initial set number from a corresponding number of automatic launch configuration to support host cloud created across the available area, achieve disaster recovery; load balancing settings binding LB instance is created, and select the corresponding virtual server is configured to do and listening port.

Step four: Binding Cloud Hosting

Add cloud host on demand, the number must be set to the telescopic group between the minimum and maximum number of instances

Step Five: Add alarm policies create "elastic stretch" strategy and the "elasticity shrink" strategy

Support regular tasks and repetitive tasks, increasing and decreasing the need for setting paired.

Step Six: Add a contact alert

"Account management" -> "contact management" in the name and contact information will automatically be recognized group, add the relevant group and contacts after the stretching group had started, termination, can not start, there will be mail and text messages can not be terminated timely notice

3, verification test results:

Own tools, methods virgin centos is sent to / dev / null Apache server running on the first random data by compressing command and results are as follows: cat /dev/urandom | gzip -9 > /dev/nullthe CPU usage reaches 99%.

Successfully ejected a cloud host; use Ctrl + C after the end of the pressurization command, CPU usage reduced; telescopic observation activity log and found that the new cloud has been automatically removed from the host, successfully removed.

Read the original

Reproduced in: https: //juejin.im/post/5d0b50d2e51d4556bc066f91

Guess you like

Origin blog.csdn.net/weixin_34015566/article/details/93179713