Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Analysis of the New Ecology of Java on Cloud enabled by KonaJDK

2025-02-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly introduces "KonaJDK enabling cloud Java new ecological analysis". In daily operation, I believe many people have doubts about KonaJDK enabling cloud Java new ecological analysis. The editor consulted all kinds of materials and sorted out simple and useful operation methods. I hope it will be helpful for you to answer the doubts of "KonaJDK enabling cloud Java new ecological analysis"! Next, please follow the editor to study!

First, the significance of self-developed KonaJDK to cloud Java ecology JDK, as the infrastructure of Java applications, is self-evident in the ecological importance of cloud Java. As a self-developed JDK of Tencent, KonaJDK has been smoothly supported in core businesses such as Tencent Cloud micro services, message middleware, big data, and as the basic supporting component of Java business in Xinchuang and other scenarios, filling in the gap of JDK components in Tencent Cloud Xinchuang scenario. This article mainly introduces the support and optimization of KonaJDK for Tencent Cloud Java business from the aspects of the support of KonaJDK in Xin Chuangyun environment, the expansion and customization of KonaJDK supporting Tencent Cloud products, and the optimization practice of KonaJDK in big data scenario. Second, KonaJDK Xinchuang environment supports Java business in Xinchuangyun environment, which requires JDK to support domestic CPU operating environment stably and efficiently. The main CPU instruction set is aarch74. Through our research, the current situation of JDK8 in the aarch74 instruction set is as follows: OpenJDKOpenJDK8 does not have the support of the aarch74 instruction set in the main branch, and the open source version that can be found online is contributed by several major participants in the open source community. For Tencent Cloud business, the open source version has not been verified in the production system, and there is no dedicated manpower to maintain and update the code. So there are risks in maintainability, security and stability. AARCH64 support is included in OracleJDKOracleJDK 8. But taking into account the cost, as well as OracleJDK 8 code is not open source, problem location and other aspects of the difficulty. At the same time, we also find that the frequent ForceSafepoint of OracleJDK may have an impact on business stability in specific scenarios, so we do not consider using OracleJDK8 as the first JDK of AARCH64. (for details, please refer to the article: "tab=" innerlink "data-linktype=" 2 ">) after a series of analysis, we finally selected KonaJDK as the preferred JDK for Tencent Cloud's Creative solution. The main reasons are as follows: the AARCH64 version of KonaJDK is based on the most popular IcedTea project in the OpenJDK community, and then it has been extensively developed by KonaJDK, adapted and modified. In terms of stability, it has been tested and verified in a large-scale production environment, and has passed the quality acceptance of proprietary clouds and other products. At the same time, Tencent's internal TencentJDK collaboration team can continue to provide version maintenance and technical support for KonaJDK. All in all, Tencent KonaJDK can provide support for JDK maintenance, technical support, optimization and customization while ensuring correctness and stability, which is more suitable for cloud business scenarios in Xinchuang environment. Third, KonaJDK supports cloud product capability expansion and customization. In addition to steadily supporting Xinchuang Cloud Java business, KonaJDK also provides various aspects of support for cloud business in terms of its customizability. We mainly explain through the following aspects: 1. Improvement of JVM monitoring and diagnosis capabilities in micro-service products according to statistics, about 60% of cloud business developers use Java language. Take Tencent Cloud Micro Service Management platform (TSF) as an example, its business support environment and micro services deployed by users are mainly implemented using Java spring cloud framework, that is, these services are run in JDK environment. But in the process of actual use, users pay more attention to the function and implementation of the business, and it is difficult to feel the role of JDK in it. For comparison, the following figure shows the micro-service in the eyes of cloud business developers. Users pay more attention to the function of each module of the micro-service and the function of the micro-service business. The following is a picture of microservices in the eyes of JVM/JDK developers:

As you can see, basically every micro-service function node is an instance of JVM. Therefore, how to use JVM side information to help developers understand the operation of their cloud business is a key function of cloud-supported platform products. Currently, Tencent Cloud micro service product TSF and message middleware product support environment have used KonaJDK as the business support component. In addition to supporting standard JMXbean and compatible with open source JVM-related profiler to provide basic JVM monitoring information for micro services, KonaJDK also makes related improvements from the following aspects (some functions are being developed and launched) JFR (Java Flight Recorder) JVM built-in lightweight Profiler, which can collect diagnosis and performance data of Java applications during operation, back port from OpenJDK11. If the default configuration is used, the JFR cost is theoretically less than 2%, so it can be used to collect data on the existing network if necessary. KonaJDK has done a lot of problem fixes and capability enhancements for JFR, which can be opened and closed dynamically at run time. The collected data can be analyzed internally through KonaProfiler, an online comprehensive JVM performance analysis tool developed by the KonaProfilerKonaJDK team, which currently supports JFR data file analysis, heap dump data analysis, jstack data analysis, flame diagram and other functions. Example-KonaProfiler supports multiple types of flame image analysis-KonaProfiler gives suggestions for JFR data analysis combined with the above capabilities. With the blessing of KonaJDK, Tencent Cloud microservice platform can provide users with a series of capabilities such as JVM monitoring and online diagnosis to meet their needs in performance analysis and tuning. two。 Support of state secret algorithm with the introduction of national standards such as state secret algorithm, customers on the cloud have more and more demand for Java version of state secret algorithm. After investigation and customer feedback, we found that there are mainly the following kinds of problems in the use of the national secret algorithm: high-cost customers need the national secret algorithm in some scenarios, but it is limited by various reasons. Customers are impossible and unwilling to develop their own national secret algorithms. At present, the implementation of the online national secret algorithm is uneven, the following is our search on the mainstream search engine "national secret algorithm Java implementation". From the results, we can see that most of the content is implemented by individual enthusiasts, or using open source projects. Each implementation of these projects needs to learn the use of API, and how to choose the right project is also a cost problem for customers. Another point of doubt lies in the reliability. In some scenarios, besides the correct processing function and excellent performance of the state secret algorithm, the reliability guarantee is also needed. For example, whether it conforms to the national standard, whether it has been certified, and so on. KonaJDK team after research, in fact, in the use of Java cryptographic algorithm, the most popular and easy-to-use implementation is Java Cryptography Architecture (JCA). Using the Cipher class and API defined by JCA, it is efficient and convenient to use the JCA cryptographic algorithm in JDK. The KonaJDK team cooperates with the internal cryptographic expert team to develop the JCA-based national secret algorithm SM2, SM3,SM4 support, which mainly has the following advantages: easy to use, the use of the national secret algorithm conforms to the standard JCA call process, and developers can use it smoothly only by simply learning a few basic points on the basis of mastering JCA. Safe and reliable, developed and maintained by Tencent's internal professional password experts, the national secret algorithm conforms to the national standard. It is easy to migrate, and it only needs a simple replacement to migrate from other JCA cryptographic algorithms to SM algorithms. The following figure shows the code changes for switching from RSA to SM2 algorithms, which can be completed with at least 3 lines of code changes. Through the national secret algorithm, we can see that the customization and technical support capabilities provided by KonaJDK can further enhance the capabilities of cloud products, facilitate customers, and increase product value by 3. 5%. Tool optimization, the improvement of Jmap scanning speed in a large number of scenarios, feedback to the community to mention Java heap analysis, I believe that many java programmers first think of Jmap. As a built-in heap memory analysis tool of JDK, Jmap can realize the statistics and dump function of jvm heap memory. In practice, we find that in a large number of scenarios such as big data, a single use of jmap takes a long time. Because the Java business thread needs to be paused during the operation of jmap, a jmap may occur that causes the Java process to become unresponsive, thus switching between the master and slave nodes, resulting in jitter in the business system. After the analysis of the problem, we introduce Jmap parallel heap scanning into KonaJDK, as shown in the figure: through parallel heap scanning and thread local data storage, we increase Jmap histo working time by 6-10 times and alleviate the business jitter problem. At the same time, as a participant in the openJDK community, we have actively contributed the feature of parallel heap scanning to the OpenJDK community. At present, the patch for G1, ZGC and shenandoahGC has been integrated into the jdk16 main line, while the patch for the ParallelScavenge heap has gone through several rounds of review and is waiting to be integrated. 4. KonaJDK performance guarantee-Big data online optimization practice in addition to the above aspects, Tencent KonaJDK expert team has made a special performance improvement for big data business. For example, through optimization such as GC scheduling, CPU utilization in the production environment is greatly reduced; GC physical memory recovery algorithm is optimized to reduce process physical memory consumption; GC algorithms such as G1 and ZGC are continuously optimized to improve stability and reduce burr. Verified by the large-scale actual deployment of big data production environment, compared with the community version, Kona JDK has obvious advantages in terms of cpu utilization and physical memory usage. At this point, the study of "KonaJDK enabling cloud Java new ecological analysis" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

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.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report