In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
"With the UK 8S, developers can quickly set up K8S environments just like they would with a regular Cloud Virtual Machine. While enjoying the convenience brought by K8S, developers can focus on the details of business implementation without wasting too much energy on infrastructure construction. UCloud's professional, fast service and response mechanisms helped us successfully migrate our entire environment from our own K8S to the UK 8S. UCloud's UK8S is as stable as any other infrastructure service, leading us to believe that 'professional people do professional things', and choosing UCloud as our cloud service provider was one of the right choices we made in terms of technology selection. "
- Yang Yi, CTO of the first year technology
Write at the beginning
This article mainly introduces the practice case of UK8S in public cloud scenario, and the case sharing in hybrid cloud mode will be launched soon.
The effect of using UK8S in the first year of technology business
The purpose of introducing UK8S landing microservice in business is not to save cloud host resources, but to save labor costs, so that developers can focus more on business implementation; it can reduce system coupling degree and R & D difficulty, so as to schedule host cluster resources more efficiently and reasonably; improve the overall delivery efficiency of the team, realize time cost savings, and finally translate into acceleration of business iteration.
About Yuannian Technology
Since its establishment in 2000, it has been focusing on the management consulting and management informatization fields with management accounting as the core, and is committed to becoming the "China Management Accounting Pilot" to help Chinese enterprises realize financial transformation and management refinement.
The professional service and software platform of the first year technology covers four aspects of enterprise operation and management: taking management accounting as the core, supporting enterprise analysis simulation, decision support and management control; taking financial sharing as the core, promoting financial transformation and improving enterprise operation efficiency; based on business intelligence platform and big data, realizing customer analysis, sales analysis and operation analysis; With enterprise informatization planning and Internet transformation as the core, we provide consulting services such as group management and control system, organization and process optimization.
Business scenarios and architecture of Cloud Express
Cloud Express is a SaaS product for business travel and expense management under Yunian Technology. It adopts cloud computing and mobile Internet technology development to condense the best practices of expense management in many industries and enterprises, meeting the core needs of enterprises to improve business capabilities, standardize business behaviors and control business expenses. Meanwhile, it integrates Internet consumption platforms such as Tongcheng, Yilong, Didi and Jingdong to open up travel application, consumption and reimbursement processes. In addition, it also integrates invoice inspection, intelligent bookkeeping and various financial interfaces to make enterprise expense control more efficient and transparent.
The mall business in this product adopts the architecture mode of combining boulder and micro-service, including two parts: mall end and mall server end. At present, the mall end still uses the traditional boulder structure, which is also under transformation. It is mainly responsible for the management of buyers and sellers, covering merchant management, shopping mall, management background and other services. Since the merchants accessed in Cloud Express did not actually open stores in the mall, the concept of docking terminal was introduced to complete the real order operation for remote merchants.
After the mall user places an order in the shopping mall and completes the payment, the docking terminal submits the order to the mall server through the API service to make a real order. The mall server adopts the micro-service architecture, and each type of service is independent and maintains a cooperative relationship. In addition, for search services, Cloud Express chose to combine microservice architecture with Solr to achieve timed synchronization of goods in the e-commerce system and push to Solr to provide search services.
Figure: Cloud Express Mall Business Architecture
Introducing K8S to solve business pain points
Under the microservice architecture, the first year technology developers found that using K8S can solve problems more effectively than the original cloud host deployment model in the following scenarios.
Pain point 1: The launch of new services and the update process of existing services are complicated
On the one hand, if you want to publish a new service on an existing cloud host, you need to consider the inconsistent requirements of different types of languages, from the basic environment to the startup script, the content is very fragmented, and the whole publishing process is quite complex; on the other hand, if you want to update an existing service, the script language can be hot updated, but the compiled language faces the same dilemma.
The conventional approach is to make nginx a proxy for the load in front of the service, and manually switch the load to ensure the update of the non-interrupted service mode, but when the number of services is large, the manual operation burden is large.
Under K8S, the self-contained self-description of container technology can be used to solve the problem of updating multiple programming languages and integrate scattered published content; in addition, the application orchestration capability of K8S can be used to publish, which can solve the problem of complex multi-application dependency publishing under microservice architecture, and reduce the probability of misoperation.
Pain point 2: Dynamic service migration operation is difficult
Figure: Schematic diagram of dynamic service migration
Due to the limitation of cloud host resources, in order to provide space for resource upgrade for specific services, it is often necessary to dynamically migrate the remaining services being executed to the new cloud host. As shown in the figure above, Service 11 needs to be upgraded from 0.5-core CPU to 1-core CPU. At this time, Service 07 and 12 need to be moved to other nodes, and then Service 11 needs to be upgraded.
When K8S is not used, in order to prevent service interruption, service 07 and service 12 are usually deployed in node 05, and resources in node 02 are cleared after service discovery is changed. In K8S, only by changing the nodeSelector of services 07 and 12, services 07 and 12 can be migrated, and the expansion requirements of service 11 can be quickly met without interruption of services.
Pain point 3: online service health check complexity is high
In order to ensure the survival of online services, it is necessary to install multi-category detection and monitoring software, which has a large workload and can only be used as an alarm reminder and cannot assist in subsequent processing.
By using the health check mechanism of K8S, the working status of the service can be detected through the health check interface of the service request, and whether the status is normal can be determined according to the response code. If the status is abnormal, K8S will automatically execute the destruction and reconstruction of the Pod to ensure the normal operation of the service.
Pain Point 4: The call between services and discovery configuration work much more
Figure: Schematic diagram of service invocation and discovery
In practice, internal calls between services are required. However, in different environments, since the internal IP cannot be fixed, multiple configuration files need to be added, and each environment corresponds to a set. When the number of services is large, the configuration work is heavy.
Service discovery of K8S is based on Service plus DNS resolution, which completes service discovery while having load. As shown in the figure above, when service 16 accesses service 18, it will first obtain the Service proxy IP of service 18 from the DNS inside K8S, and then access service 18-proxy.
Pain point five: a single service completely consumes cloud host resources
In the original deployment mode, multiple services are running on a single cloud host at the same time, and there is no limit on the CPU, memory, and disk IO of each service, resulting in a situation where the load of a single service is too high, exhausting the resources of the entire host, and thus the host is stuck. At this time, the new resource deployment service is expanded, and the whole recovery process is relatively long.
The K8S can limit the CPU and memory usage of services, effectively reducing the contention of service resources running on the same host.
Migration from self-built K8S to UK 8S
There are two sets of K8S clusters in the technology business in the first year. One is a self-built K8S cluster running in an online intranet environment, which is directly built and managed by Rancher, and the other is a self-built K8S cluster running in a UCloud public cloud environment. Considering that UK 8S has the following advantages compared with self-built K8S cluster, it is finally selected to migrate from self-built K8S cluster to UK 8S.
Table: UK 8S vs self-built K8S
-END -
Welcome to scan the QR code below, join the UCloud K8S technology exchange group, and discuss Kubernetes cutting-edge technology with us. (If the number of people in the group has been filled, you can add the group owner WeChat Zhaoqi628543, note K8S can invite you to join the group.)
TIC 2019 registration is hot, welcome to join us to discuss Kubernetes technical practice! UCloud Lab Director Ye Lideng will bring more Kubernetes technical dry goods to Technical Session A. In addition, the technology special session also brings together hot topics such as Serverless, microservices, distributed technology, etc. We invite the majority of technology developers to scan the QR code below to participate in the registration and share the technology feast!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.