Visit Azul.com Support

Registering a New Compiler Engine in Cloud Native Compiler

Since different versions of Azul Zulu Prime JVMs may require different compiled code, a Cloud Native Compiler must be able to produce different versions of compiled code simultaneously. You do not need to create a separate Cloud Native Compiler instance for each application or different Java version.

Cloud Native Compiler (CNC) does not have its own compiler - it is just server-side infrastructure for running the JIT compiler that ships inside of Azul Zulu Prime Builds of OpenJDK. This compiler is uploaded to the CNC service from the JVM in the form of a Compiler Engine.

Each version of Azul Zulu Prime JVM contains a signed Compiler Engine distributable. Cloud Native Compiler comes with the Compiler Engine for Azul Zulu Prime JDK 21.09.1.0 pre-installed. You can manually upload other Compiler Engines to your Cloud Native Compiler.

Registering a New Compiler Engine

Anyone can upload a new Compiler Engine to a Cloud Native Compiler service. Compiler Engines are signed to prevent malicious versions of Compiler Engines from being installed.

To upload a new Compiler Engine, go to the Azul Zulu Prime JVM installation directory and run the etc/connected-compiler/upload-compiler-engine script. The script takes the URL of the Cloud Native Compiler gateway service as an argument. Find the IP address of your gateway service. If your client VM is in the same cluster as the Cloud Native Compiler, use the internal 8080 port.

If your client VMs are deployed outside the Cloud Native Compiler cluster, see Connecting a JVM to a Cloud Native Compiler for how to get the IP address of the gateway service. Make sure you use the port that is mapped to 8080 in the gateway service.

For example, if your JVM node is running in the same cluster as the Cloud Native Compiler service:

 
./etc/connected-compiler/bin/upload-compiler-engine http://10.10.100.100:8080
Note
You must run this command from a Linux system.

If an Azul Zulu Prime JVM connects to a Cloud Native Compiler that does not have the corresponding Compiler Engine installed, the JVM will automatically switch to performing optimizations on the client VM using using only the C1 compiler. Note that the code produced by the C1 compiler is significantly slower than the code produced by the Falcon compiler on either a regular Azul Zulu Prime JVM or on a Cloud Native Compiler.

Inspecting the Installed Compiler Engines

Each Compiler Engine has a Compiler Engine ID. You can view all of the Compiler Engines that are installed on a Cloud Native Compiler by calling the /compiler-engines REST API on the gateway service’s 8080 port when calling from inside the cluster or the external port that is mapped to 8080 when calling from outside the cluster.