头图

Cloud computing has flourished for more than ten years, from the initial fresh word to the huge industry and ecology that has now formed. In the past ten years, new ideas and new technologies have been emerging, resulting in tremendous changes in the IT industry. As a developer in the new era, grasping the development direction of technology is crucial in this ever-changing world.

On December 18, Amazon Cloud Technology Shenzhen User Group Community Day was held. The event led everyone to take stock of the technical innovation essence of the Amazon Cloud Technology re:Invent2021 global conference and interpret the latest trends in cloud computing. At the same time, four developers from Amazon Cloud Technology shared the exploration and practice of cloud native application development, involving discussions on many cutting-edge technology topics such as serverless, containers, and cloud native.

Re: Invent 2021 innovations inventory

Although the re:Invent2021 global conference has come to a successful conclusion, the enthusiasm of developers for the discussion of this event has not faded. The Internet of Things, containers, serverless, machine learning, 5G, robotics... Dozens of new products and new functions in cutting-edge fields have been released, some of which may represent the future development direction of the world on the cloud. Wang Yubo, chief developer evangelist of Amazon Cloud Technology, explained the essence of technological innovation of re:Invent 2021 from the perspective of developers' attention on this Community Day.

Behind the more than 200 full-featured services provided by Amazon Cloud Technology, there is a core driving force that is API. Since Bezos issued an instruction to the whole company in 2002, "From today, all teams must provide data and various functions in the form of service interfaces", Amazon's e-commerce systems have been connected and interacted with APIs , which prompted the rapid evolution of the Amazon platform. This principle later also became the cornerstone of Amazon Cloud Technology to build cloud services. In the 15 years of consistently adhering to this principle, Amazon Cloud has drawn up 6 lessons about using APIs.

  • APIs are forever
  • Never break backward compatibility
  • Working backwards from a customer scenario
  • Make API failure modes well-documented
  • Create a self-describing API with a clear, specific purpose
  • Avoid leaking implementation details at all costs

After introducing the core driving forces behind the many services of Amazon Cloud Technology, Wang Yubo shared the innovations and breakthroughs at this year's re:Invent from the four dimensions of development tools, cloud-native architecture, machine learning, and the community that developers care about most.

01 Development Tools

For a long time, Amazon Cloud Technology has provided many development tools to help developers quickly build and develop in the cloud. In this re:Invent, three new SDKs have been released, which support Swift, Kotlin and Rust languages respectively, further meeting the needs of developers to quickly build in the cloud using familiar languages.

In addition, Wang Yubo also introduced Infrastructure as Code (IaC). Infrastructure as code is a very hot topic in the development field. It helps developers quickly acquire and configure resources in a programmable way, and open up software and hardware through code. Amazon Cloud Technology has two main services for the infrastructure-as-code field. The first is Amazon CloudFormation, which helps developers create, configure, and manage resources in the form of templates, and the second is Amazon CDK, which helps developers define cloud infrastructure in a familiar language and further implement them through Amazon CloudFormation. Third, Amazon Cloud Technology has released a product called Amazon Amplify Studio in the development of full-stack applications, which can build web applications and UIs in a low-code way, and can quickly build full-stack applications in combination with Amazon Amplify to get through the cloud. The whole process of full stack application development.

02 Cloud native architecture

Since 2018, with CNCF's definition of cloud native, cloud native technology has been increasingly recognized by major manufacturers and developers. In this field, Amazon has a lot of ideas and practices to share with you. Containers are the core infrastructure for building modern cloud-native applications. Amazon Cloud Technology provides a wealth of services and deployment methods in the field of containers. In this year's re:Invent, Amazon Cloud Technology launched the production-ready Karpenter mainly for the elastic scaling of Kubernetes clusters. It is an open source project. The current version has been changed to version 0.5. Karpenter is used for flexible and high-performance Kubernetes cluster elasticity. Scaling helps improve application availability and resource utilization. In the serverless field, Amazon Cloud Technology's Lambda has always been a pioneer. This year's re:Invent increased the capacity of Lambda's temporary storage, which is helpful for the deployment of data analysis and machine learning inference on serverless.

03 Machine Learning

To develop in depth and to develop into the industry is the development trend of machine learning. At this year's re:Invent, Amazon Cloud Technology announced its in-depth cooperation with Meta in the field of PyTorch to promote the development and innovation of the PyTorch open source framework. There are a large number of PyTorch developers on Amazon Cloud Technology. Together with Meta, Amazon Cloud Technology promotes the construction of the PyTorch Chinese user community and helps developers to develop, discuss and communicate better. In addition, for machine learning developers, Amazon Cloud Technology has released SageMaker Studio Lab, which can help developers learn machine learning and experiment with new technologies using free computing power and rich technical resources.

04 Community

The developer community was covered in the keynote speech at re:Invent for the first time this year, and it can be seen that Amazon Cloud Technology is paying more and more attention to the developer community. Launched Amazon re:Post at this year's re:Invent, a community-driven question-and-answer site that helps remove technical barriers associated with using Amazon's cloud technology products, enable knowledge acquisition and learning, and help everyone communicate and interact. At the same time, Amazon Cloud Technology has highlighted the importance of Hero. Heroes play an increasingly important role in the developer community and become an important driving force for community growth.

: The Design and Evolution of Amazon

After Wang Yubo's interpretation of the development trend of cloud computing in 2021 based on re:Invent, three developers from Amazon shared their experience in cloud-native application development in different technical fields. When it comes to the new trend of cloud computing development, we have to mention container technology. Amazon EKS is an open source container orchestration engine that supports automated deployment, massive scalability, and application containerized management, while Amazon EKS removes the complexity of running a highly available Kubernetes cluster and delivers more production-ready A resilient architecture that makes it easy for developers to run Kubernetes on AWS. On this Community Day, Jun Lin, senior solution architect of Amazon Cloud Technology, focused on the design mechanism behind EKS and the close cooperation with the open source community, and discussed the follow-up technology development route.

Simply deploying and running a container is very simple, but building a Kubernetes platform by yourself is a relatively painful process, such as high availability, etcd backup, elastic scaling of nodes on the data plane, resource scheduling, etc. Amazon EKS is like this born in the background. The design behind it has the following characteristics:

  • Each cluster is a single-tenant model, the control plane runs on a VPC managed by AWS, and the data plane runs on a VPC managed by the user. EKS will achieve high availability of the control plane across availability zones.
  • The data plane can also choose to use the Fargate service, and EKS can automatically realize the elastic scaling of Pods, which is billed according to the running time of the Pods.
  • The interaction between the control plane and the data plane can be configured by parameters, and both internal and external networks are under the control of Amazon to ensure security.
  • Initiate a cluster maintenance event through the command line or interface, and complete the response processing with the service.
  • Automatically complete the version update of all clusters in the entire region by deploying, verifying, and expanding deployment.
  • According to Lin Jun, Amazon Cloud Technology's plan on Amaozn EKS will mainly focus on the operation and maintenance of Kubernetes clusters. For example, you can see in the currently public roadmap.
  • The Amazon EKS Anywhere service, now available, means Amazon EKS can help you deploy, operate, and secure your Kubernetes environment no matter where your Kubernetes is deployed. Currently supports deployment in Vmware environment, Amazon EKS Anywhere will plan to support deployment in bare metal environment in 2022
  • A karpenter 1.0 version is planned to be launched in 2022, which supports the efficient expansion and contraction of Kubernetes clusters under large-scale nodes.

: Constructing a highly available and low-cost e-commerce

Amazon cloud technology has brought us a very powerful and comprehensive tool stack. How to use it to better create value is a topic before us. Nowadays, we increasingly choose online shopping as a shopping method, which poses challenges to the usability and high performance of e-commerce platforms. Sun Huawei, senior serverless product expert of Amazon Cloud Technology, introduced how to use Amazon Lambda, EFS and Amazon Aurora Serverless constructs a high-availability and low-cost serverless e-commerce stand-alone station.

Serverless computing has the following four characteristics:

  • No need to manage servers
  • Autoscale
  • pay for value
  • Built-in high availability and fault tolerance

Because Amazon Lambda is event-driven, a typical Amazon Lambda-based application is nothing more than an architecture that triggers an Amazon Lambda function with an event source, and the function can access the backend database or any other service. The Amazon Lambda Adapter open source project can help developers convert between Amazon Lambda events and HTTP requests. The architecture of this version is designed to save costs. To improve performance, you can consider targeted optimization at the WordPress, EFS, and PHP levels.

WordPress Optimization

  • Choose a lightweight theme.
  • Choose Page Builder with good performance, it is recommended to use Gutenberg directly.
  • Use Memcached as the backend for Object Cache.

EFS usage optimization

  • WordPress code includes a lot of small files and EFS has high latency to access a lot of small files
  • Package WordPress code, themes and plugins into Amazon Lambda container images
  • Keep only the wp-content/uploads directory on the EFS filesystem
  • WordPress code, themes and plugins are kept in a git repository

PHP performance optimization

  • After the code is updated, deploy the new Amazon Lambda version through the CI/CD pipeline
  • Use Opcache to cache PHP file compilation results
  • Using Opcache File Cache
  • Package the precompiled Opcache File Cache file into an Amazon Lambda function

Through these performance optimizations and architecture iterations, we have successfully supported a peak traffic of 20,000 orders per minute on Serverless WooCommerce. And the cost of API Gateway and Amazon Lambda to process 1 million orders is only $303. Through this test, we have proved that the serverless e-commerce independent station can not only support the peak value of millions of orders per hour, but also has an ultra-low cost, which is very suitable for building e-commerce independent stations and e-commerce independent station SaaS services.

cloud native: rapid prototyping and development of core technologies

Whether it is containers or serverless, product availability and performance are very important indicators in the production stage, and one of the keys to retaining and carrying more users. With the advent of the cloud native era, a large number of enterprises have moved from On Cloud to In Cloud. As developers, they are more concerned about the needs of the market, so they can respond actively and quickly, and quickly turn ideas into products and services. Instead of building a wheel from scratch, standing on the shoulders of the cloud, building blocks, and gradually adding new functions in iterations to improve the user experience. From the perspective of developers, Huang Shuai, senior development evangelist of Amazon Cloud Technology, discusses the role of rapid prototyping in accelerating business results, and has an in-depth understanding of how to unleash the power of prototyping.

Huang Shuai said that in fact, cloud native is a method of building or running applications. It relies on the unique elasticity and distributed advantages of cloud computing itself, so that we can quickly build it and push it to the market. Market feedback, and then move on to the next step. Cloud-native development incorporates the concepts of DevOps, continuous delivery, microservices, and containers.

Gall's definition says that a well-functioning complex system always evolves from a well-functioning simple system. The delivery form of cloud-native applications is exactly the same. From customer requirements, initial demonstration (Demo), proof of concept (POC), to prototyping and development (Prototyping), then pilot application (Pilot) to delivery to production (Production), it is precisely A process that evolves from simple to complex. Among them, the part of prototyping and development is the key link in the whole process. Our core expectations for this phase are three:

  • Rapid Innovation: Using New Software Technologies to Accelerate Innovation
  • Total Governance: Automatic and scalable management of software and infrastructure
  • Continuous Optimization: Reduce Development Cycles, Reduce Risk, and Reduce Costs

Both prototyping and development are characterized by time: Storyboarding from requirements (1 day), architecture design (1 day), UI prototype (1 day), code implementation (5 days), testing (2 days) and verification (2 days). Prototypes are designed and developed with the help of a large number of tools throughout the process to bring them to market quickly. Code is cloud, everything is API. With so many cloud computing services, we can quickly implement and deploy from front-end to back-end to database. In the platform of Amazon cloud technology, the services that can help us realize the prototype are all built on the basis of serverless, and rapid prototype development is carried out in the form of building blocks. There are three worthy of attention:

  • Amazon App Runner to rapidly deploy containerized web applications and APIs at scale without requiring infrastructure experience for developers.
  • Amazon Amplify, front-end web and mobile developers to quickly and easily build full-stack applications on the cloud without prior experience building APIs, writing server-side code, or setting up databases.
  • Amazon Amplify Studio, the low-code and visual way to go from UI designs to secure, scalable, and production-ready applications faster, delivers new innovations to end users, while still maintaining full control over application code.

What exactly is cloud native? At the end of his sharing, Huang Shuai summed up this issue. Cloud native is a direction and a culture, which leads enterprises to understand and use cloud computing more deeply, so that applications not only grow on the cloud, but also adapt to the cloud in a way. The way of computing, native build and continuous iteration. He mentioned that rapid prototyping is a link between the past and the future in the entire cloud native, standing on the shoulders of cloud computing, using a large number of serverless services of Amazon cloud technology to make applications and development faster and more stable.

image.png


亚马逊云开发者
2.9k 声望9.6k 粉丝

亚马逊云开发者社区是面向开发者交流与互动的平台。在这里,你可以分享和获取有关云计算、人工智能、IoT、区块链等相关技术和前沿知识,也可以与同行或爱好者们交流探讨,共同成长。