Architecture Overview
Optimizer Hub is a component of Azul Prime that makes your Java programs start fast and stay fast. It consists of two services:
-
Cloud Native Compiler: Provides a server-side optimization solution that offloads JIT compilation from Zing’s Falcon JIT compiler to separate and dedicated service resources, providing more processing power to JIT compilation while freeing your client JVMs from the burden of doing JIT compilation locally.
-
ReadyNow Orchestrator: Records and serves ReadyNow profiles. This greatly simplifies the operational use of ReadyNow, and removes the need to configure any local storage for writing the profile. ReadyNow Orchestrator can record multiple profile candidates from multiple JVMs and promote the best recorded profile.
Optimizer Hub ships as a Helm chart and a set of Docker images to deploy into a Kubernetes cluster. The Helm chart deploys different components based on the use case.
Interaction Between Optimizer Hub and JVMs
Azul Zing Builds of OpenJDK (Azul Zing) integrates with Optimizer Hub to offload JIT compilation and manage ReadyNow profiles. The following diagram shows how the ReadyNow and Falcon Compiler components in Azul Zing interact with the ReadyNow Orchestrator and Cloud Native Compiler services in Optimizer Hub.
sequenceDiagram
box Azul Zing
participant RN as ReadyNow
participant FC as Falcon Compiler
end
box Optimizer Hub
participant RNO as ReadyNow Orchestrator
participant CNC as Cloud Native Compiler
end
RN->>RNO: 1. Ask for a profile
RN->>FC: 2. Instruct what to compile
RN->>RNO: 3. Send back new profile version
FC->>CNC: 4. Ask to compile the code (optional)
CNC->>FC: 5. Send back the compiled code (optional)
Deployment Options
Optimizer Hub offers two deployment options: a full installation of all components or a ReadyNow Orchestrator-only installation.
Full Installation
In a full installation, all Optimizer Hub components are available and scale the gateway, compile-broker, and cache when needed. Use the Standard Optimizer Hub Installation Procedure on Kubernetes.
flowchart LR
subgraph EXT[" "]
direction TB
JVMs["Application JVMs"]
Admins(["Administrators,<br/>Tools"])
end
LB1(["Load Balancer"])
LB2(["Load Balancer"])
subgraph NS["Kubernetes Namespace"]
direction LR
GW["JVM Gateway<br/>7 vcore, 14 Gi<br/>(Scaling)"]
MG["Management Gateway<br/>2 vcore, 2 Gi"]
SO["Scaling Operator<br/>1 vcore, 2 Gi"]
CB["Compile Broker<br/>7 vcore, 26 Gi<br/>(Scaling)"]
Cache["Cache<br/>7 vcore, 26 Gi<br/>(Scaling)"]
TE["Task Executor<br/>4 vcore, 16 Gi"]
Blob[["Blob Storage"]]
SO -.->|control| GW
SO -.->|control| Cache
SO -.->|control| CB
GW --> Cache
CB <--> Cache
TE --> Blob
TE --> Cache
MG --> Blob
MG --> Cache
Cache --> Blob
end
K8sAPI[["Kubernetes API"]]
SO -.->|control| K8sAPI
JVMs -->|gRPC| LB1
Admins -.->|"control over HTTP(s)"| LB2
LB1 -->|gRPC| GW
LB2 -.->|"control over HTTP(s)"| MG
classDef dashed stroke-dasharray: 5 5;
class K8sAPI,Blob,LB1,LB2 dashed;
style EXT fill:none,stroke:none
Remarks:
-
Dotted arrows indicate control-plane traffic (administration, scaling decisions, and Kubernetes API calls); solid arrows indicate data-plane traffic.
-
All services use one pod, except Cache uses two pods by default.
-
The load balancer is either your own solution (recommended), or the optional
gw-proxyincluded in Optimizer Hub. See Configuring Optimizer Hub Host for more info. -
Task Executor runs the background jobs that build compilation streams and refresh the ReadyNow profiles used by Indirect Delivery. Like the Scaling Operator and Management Gateway, it is a fixed-size component that does not autoscale.
ReadyNow Orchestrator Only
When you need only ReadyNow Orchestrator, you can deploy a reduced set of the Optimizer Hub components in the Kubernetes cluster. See Installing without Cloud Native Compiler.
flowchart LR
JVMs["Application JVMs"]
Admins(["Administrators,<br/>Tools"])
LB1(["Load Balancer"])
LB2(["Load Balancer"])
subgraph NS["Kubernetes Namespace"]
direction LR
GW["JVM Gateway<br/>7 vcore, 14 Gi<br/>(Scaling)"]
MG["Management Gateway<br/>2 vcore, 2 Gi"]
Cache["Cache<br/>7 vcore, 26 Gi<br/>(Scaling)"]
TE["Task Executor<br/>4 vcore, 16 Gi"]
Blob[["Blob Storage"]]
GW --> Cache
TE --> Cache
TE --> Blob
MG --> Cache
MG --> Blob
Cache --> Blob
end
JVMs -->|gRPC| LB1
Admins -.->|"control over HTTP(s)"| LB2
LB1 -->|gRPC| GW
LB2 -.->|"control over HTTP(s)"| MG
classDef dashed stroke-dasharray: 5 5;
class Blob,LB1,LB2 dashed;