Gracefully release HSF applications
When a High-speed Service Framework (HSF) application starts, it registers services with the registry before all dependencies -- such as Redis connections and database pools -- are fully initialized. If a consumer routes traffic to the provider during this window, calls fail.
Graceful release delays HSF service registration until the application is fully ready. The setup requires three steps: add a health check endpoint, enable delayed registration with a JVM parameter, and mount a post-launch script that triggers registration after startup completes.
How it works
By default, HSF provider beans register with the registry during Spring container initialization. A consumer that receives the registration notification immediately sends requests -- even if the provider's backing resources are not yet available.
With graceful release enabled, the startup sequence changes:
The application starts and initializes all Spring beans, including HSF provider beans, without registering them.
After all beans are initialized and
RefreshEventis sent, Pandora sets its internal status totrue.The app server (Tomcat) starts. Before the web server is started, you can run
curl localhost:12201/hsf/statusto check whether HSF services are initialized. If so, start the Apache or NGINX web server.The EDAS post-launch script runs
curl localhost:<port>/hsf/online?k=hsfto trigger registration.HSF registers all provider beans with the registry. Traffic begins flowing only after this step.
Operations and maintenance (O&M) coordination is also required: after verifying the HSF initialization status, the web server (Apache or NGINX) must be started separately.
No inbound traffic reaches the application until every dependency is ready.
Before you begin
Make sure the following requirements are met:
EDAS Container V3.5.7 or later. If your version is earlier, upgrade it first. For more information, see Upgrade or downgrade the runtime environment
A health check URL configured in your application code (see the next section)
Add a health check endpoint
EDAS does not provide a health check URL by default. You must manually create and configure the required controller in your application code. A health check URL allows a script to be mounted that informs EDAS when the application has started. The script is automatically executed after the application starts.
Add the following controller:
@RestController
public class HealthCheckController {
@RequestMapping("/health")
public String healthCheck(){
return "success";
}
}A URL-based health check reflects application health more accurately than a port-based check because it verifies that the web layer is responding, not just that a port is open.
Before configuring a health check URL:

After configuring a health check URL:

Enable delayed registration
Configure the JVM parameter that prevents HSF from registering services at startup.
Log on to the EDAS console.
In the left-side navigation pane, choose Application Management > Applications.
In the top navigation bar, select a region. On the Applications page, select the microservices namespace that contains your application, then click the application name.
On the Basic Information page, find JVM Parameters in the Application Settings section and click Edit.
In the Application Settings dialog box, click Custom. In the Custom Parameters field, enter the following value, then click Configure JVM Parameters.
-Dhsf.publish.delayed=true
With this parameter set, HSF provider beans initialize normally but do not register with the registry. Registration occurs only after the post-launch script sends the trigger (configured in the next section).
Verify delayed registration
Log on to the Elastic Compute Service (ECS) instance where the application is deployed and confirm that services are in a delayed (unregistered) state:
Connect to the instance:
telnet localhost 12201Switch to the HSF directory:
cd hsfList the service status: Services should appear as unregistered. The following screenshot shows an example:
ls
Mount the post-launch script
The post-launch script runs automatically after the application starts. It reads the Pandora Boot port from a configuration file and sends the registration command.
Log on to the EDAS console.
In the left-side navigation pane, choose Application Management > Applications.
In the top navigation bar, select a region. On the Applications page, select the microservices namespace that contains your application, then click the application name.
On the Basic Information page, click Mount Script in the Application Settings section.
In the Mount Script dialog box, click Post-launch Script and enter the following script:
# 1. Find the line containing the QoS port # 2. Remove Windows-style carriage returns # 3. Build the curl command with the extracted port # 4. Run the command to trigger HSF registration grep "PANDORA QOS PORT" /home/admin/edas-assist/edas-assist.pid | sed 's/\x0D$//' | awk -F":" '{ print "curl localhost:"$2"/hsf/online?k=hsf"}'| sh
Script breakdown
The script reads the Pandora Boot Quality of Service (QoS) port from /home/admin/edas-assist/edas-assist.pid and uses it to send the HSF online command.
| Stage | Command | Purpose |
|---|---|---|
| 1. Extract port | grep "PANDORA QOS PORT" .../edas-assist.pid | Finds the line containing the QoS port number |
| 2. Clean line ending | sed 's/\x0D$//' | Removes any Windows-style carriage return |
| 3. Build command | awk -F":" '{ print "curl localhost:"$2"/hsf/online?k=hsf"}' | Constructs the curl command with the extracted port |
| 4. Run | sh | Runs the constructed curl command to trigger registration |
Why the port is read from a file: The Pandora Boot port is randomly assigned when EDAS Container starts. It is typically 12201, but if that port is occupied, the next available port is used. The file edas-assist.pid always contains the actual port:
PID:19426
HSF PORT:12200
PANDORA QOS PORT:12203
MONITOR PORT:8006
CSP PORT:8719Trigger registration manually
To trigger registration manually, run the curl command directly. Use the QoS port from edas-assist.pid:
curl localhost:12203/hsf/online?k=hsfIn this example, 12203 is the PANDORA QOS PORT value. Replace it with the actual port from your edas-assist.pid file.
Verify the result
After configuring delayed registration and the post-launch script, deploy or restart your application. Use either of the following methods to confirm that graceful release is working.
Check service status through QoS
Log on to the ECS instance where the application is deployed and check whether services are now registered:

Services should show as online after the post-launch script runs.
Check the HSF log
Look for the following entry in /home/admin/logs/hsf/hsf.log:
01 2019-11-26 16:23:03.456 INFO [qos-worker-3-1:t.hsf] [38ef6d01-10a8-405d-8725-bd7bf121****] [] [] Receive online command.Do HSF online.This log entry confirms that the application received the registration command and brought HSF services online.