brief introduction ：Java As an object-oriented programming language , Outstanding performance in terms of performance . But behind the high performance ,Java The poor start-up performance is also impressive , The impression is that Java heavy 、 Most of the impression of slowness comes from this , There seems to be some contradiction between high performance and fast startup speed .
Java As an object-oriented programming language , Outstanding performance in terms of performance . But behind the high performance ,Java The poor start-up performance is also impressive , The impression is that Java heavy 、 Most of the impression of slowness comes from this , There seems to be some contradiction between high performance and fast startup speed .
In recent days, , Alibaba cloud Serverless Application engine (SAE) Blockbuster released Java Application startup acceleration function , For the first time Alibaba Dragonwell( Alibaba open source Open JDK Long term support version ) Cold start acceleration technology 、 Multithreading acceleration technology and SAE Our own in situ upgrade strategy 、 Image preheating strategy , Realized Java The end-to-end startup speed of the application has been increased to only 15s, Multithreading performance improvement 30%, Plus its own 0 Code transformation advantage , It has become an enterprise enjoyment Serverless The shortest path to value .
as everyone knows , Users of microservices are faced with some problems at the application startup level ：
• Big package ： A few hundred MB even to the extent that GB Level
• More dependent packages ： Hundreds of dependency packages , Thousands Class
• Loading time ： Load dependency package from disk , Until then Class Load on demand , Up to half the startup time
With the help of Dragonwell Fast start and multithreading acceleration capabilities ,SAE by Serverless Java The application provides a set of , Best practices for getting apps to start as quickly as possible , Let developers focus more on business development ：
• Java Environmental Science + JAR/WAR Package deployment ： Integrate Dragonwell 11 , Provides an accelerated startup environment
• JVM Quick settings ： Support one click to start quickly , Simplified operation
• NAS Network disk ： Support cross instance acceleration , When a new package is deployed , Accelerate new boot instances / Batch release start speed
We choose some micro Services 、 Typical business scenarios with complex dependencies Demo Or internal application , Test the startup effect , It is found that applications generally reduce 5%～45% The start-up time of . If the app starts , There are the following scenarios , There will be a significant acceleration effect ：
• Class load more （spring-petclinic Start loading about 12000+ classes）
• Less dependent on external data
Alibaba's internal search recommendation Serverless The platform is isolated by class loading , Merge and deploy multiple businesses in the same Java In the virtual machine . The scheduling system will merge and deploy the business code to the idle container on demand , So that multiple businesses can share the same resource pool , Greatly increase deployment density and overall CPU Usage rate .
Due to the need to support a large number of different business R & D operations , The platform itself needs to provide enough rich functions , Caching 、RPC call . So search for recommendations Serverless Every part of the platform JVM They all need to pull up similar Pandora Boot Middleware isolation container for , This will load a large number of classes , Slow down the start-up speed of the platform itself . When surging demand enters , The scheduling system needs to pull up more containers for business code deployment , At this point, the start time of the container itself is particularly important .
be based on Dragonwell Fast start technology for , The search recommendation platform will perform in the pre release environment AppCDS、Jarindex Equal optimization , Will produce archive File into the container image , In this way, each container can enjoy acceleration at startup , Reduce by about 30% The start-up time of .
An external customer , With the help of SAE Provided Jar Package deployment and Dragonwell 11, Fast iteration online a tide brand shopping mall App.
In the face of big push second kill , With the help of SAE Serverless Ultimate flexibility , And application index QPS RT Index flexibility , Take it easy 10 Times the rapid expansion demand ; At the same time, one button is on Dragonwell Enhanced AppCDS Start acceleration capability , Reduce Java application 20% The above startup time is , Further accelerate app launch , Smooth and healthy operation of business .
SAE It's application oriented aPaaS platform , Realized Serverless framework + Perfect integration of microservice Architecture , This time, I'll weigh it again Dragonwell Start up and run up Acceleration Technology , So that customers can easily enjoy the technology dividends brought by application acceleration .
Link to the original text ：https://developer.aliyun.com/article/782978?
Copyright notice ： The content of this article is contributed by alicloud real name registered users , The copyright belongs to the original author , Alicloud developer community does not own its copyright , It also does not bear the corresponding legal liability . Please check the specific rules 《 Alicloud developer community user service agreement 》 and 《 Alibaba cloud developer community intellectual property protection guidelines 》. If you find any suspected plagiarism in this community , Fill in the infringement complaint form to report , Once verified , The community will immediately delete the suspected infringement content .