edit-icon download-icon

Application settings

Last Updated: Jun 07, 2018

This document describes how to set the parameters of applications.

  1. Log on to the EDAS console, click Applications in the left-side navigation pane, and click the application name to go to the Application Details page.

  2. On the Application Details page, select the Basic Information tab and go to the Application Setting section. click Settings on the right.

Set JVM parameters

JVM parameters are used to configure the container parameters when an application is started. Correct setting of JVM parameters helps reduce the overhead of garbage collection and thus shorten the server response time and improve throughput. If container parameters are not set, JVM parameters are allocated by default.

Note: The JVM parameter settings are written to the bin/setenv.sh file in the container directory. To apply the settings, restart the application.

In the Application Settings dialog box that appears, click the JVM tab and set JVM parameters. Then click Configure JVM Parameters.

JVM

Description of JVM parameters:

  • Initial Heap Size: Corresponds to the -Xms parameter.
  • Maximum Heap Size: Corresponds to the -Xmx parameter.
  • Maximum permanent generation size: Corresponds to the -XX:MaxPermSize parameter.
  • Custom: Corresponds to the -D parameter and is used to set the system attribute when a Java program is started.

Configure Tomcat

You can configure settings such as the port number, thread pool size, and encoding type the Tomcat container in the EDAS console.

Note:

  • After you set Tomcat container parameters, restart the container to apply the parameter settings.
  • Tomcat container configuration is supported by EDAS Agent 2.8.0 and later.

In the Application Settings dialog box, click the Tomcat tab and set Tomcat parameters. Then click Configure Tomcat.

Tomcat

Description of Tomcat parameters:

  • Application Port: The port number range is (1024, 65535). The admin authority is needed for container configuration and the root authority is required to operate ports with numbers less than 1024. Therefore, enter a port number greater than 1024. The default value is 8080.

  • Tomcat Context: Application access path.

    • If you select Package Name, you do not need to set the custom path, and the application access path is the same as the name of the WAR package.
    • If you select Root, you do not need to set the custom path, and the application access path is /.
    • If you select Custom, fill in the path in the customized path field. If not set, the default application access path is the same as the name of the WAR package.
  • Maximum Threads: Number of connections in the connection pool. It corresponds to the maxThreads parameter. The default value is 400. This parameter has significant implication on performance. We recommend that this parameter be set under professional guidance.

  • Tomcat Encoding: Code format of Tomcat including UTF-8, ISO-8859-1, GBK and GB2312. Default format is ISO-8859-1.

Configure SLB

If you have purchased Alibaba Cloud SLB, EDAS synchronizes your SLB instance to the EDAS console and provides the relevant configuration function. For details about SLB, see the SLB document.

SLB instances are classified into Internet- and intranet-based instances, which share the same configuration method.

The following describes how to configure an Internet-based SLB instance.

In the Application Setting dialog box that appears, click the SLB tab, select the SLB instance from the “SLB (Intranet)” or “SLB (Internet)” drop-down list, and click Configure SLB.

SLB

Description of SLB parameters:

  • SLB (Intranet): SLB instance located in Alibaba Cloud.
  • SLB (Internet): SLB instance located in Internet.
  • SLB Port Monitoring: Enable or disable SLB port monitoring. After you enable the SLB port monitoring, you need to set the frontend port.

Configure health check

EDAS provides the health check function to check whether deployed applications are running properly.

Overview

Health check is the process whereby the EDAS Agent periodically checks and reports the status of containers and applications and then sends the check results to the console. Health check helps you understand the overall service running status in a cluster environment and assists you with audit and troubleshooting. You can configure a health check URL in the EDAS console to check whether deployed applications run properly.

The following figure shows how EDAS Agent performs health check for applications.

Health check

Health check is triggered every 10 seconds. The steps marked by 1 and 2 are described as follows.

  1. The agent checks whether the Ali-Tomcat process used to run the user application is alive.

    • If the process is alive, the agent proceeds to Step 2.
    • If the process is not alive, health check ends and the check fails.
  2. The agent checks whether Code 200 is returned by the configured URL.

    If no URL is configured, this check is not performed; if a URL is configured, the agent checks whether HTTP Code 200 is returned by the configured URL.

For description of status in Steps 1 and 2, see the following section.

View health check status

  1. Log on to the EDAS console, click Applications in the left-side navigation pane, and click the application name to go to the Application Details page.

  2. View the Running Status field of the Instance Information list in the lower part of the page.

    Deployment instance status

    Description of real-time status:

    • Container Exits: Displayed when the agent detects that the Ali-Tomcat process is not alive in Step 1.

    • Application Abnormal: Displayed when any other code than Code 200 is returned by the configured URL in Step 2.

    • Normal: Displayed if no exception occurs in Step 1 and Step 2.

      If the agent detects no configured URL in Step 2, the Normal state is still displayed, followed by an exclamation mark. When you point the cursor over it, the prompt “Configure a health check URL to check the application status accurately” is displayed.”

    • Agent Abnormal: Displayed if the agent does not report status information to the EDAS server in 30 seconds.

Configure health check

If health check is not configured, containers with agent versions later than EDAS Agent 2.8.0 automatically allocate the health check path http://127.0.0.1:8080/[.war package name]/_ehc.html. To manually configure a health check URL, follow these steps:

  1. Click Modify next to the health check URL in the Basic Information tab of the Application Details page.

  2. Enter a correct health check URL and click Save.

    If you have configured corresponding container settings, configure a health check URL in the format of http://127.0.0.1:[custom port number/[configured path]/_ehc.html according to the container configuration. “_ehc.html” is the default path. Replace it with a custom path as needed. Ensure that the health check URL is accessible by applications and can return HTTP Code 200 to Code 500.

    Example: Assume that the WAR package name is “order.war”. You can configure such a health check URL http://127.0.0.1:8080/order/_ehc.html if no container setting is configured; or you can configure the health check URL as http://127.0.0.1:8081/healthcheck.html if the container path is configured as the root path, the port number is set to “8081”, and the WAR package contains the “healthcheck.html” file for the purpose of health status marking.

Modify basic information

In the Application Setting dialog box that appears, click the Basic Information tab, enter the Application Name and click Modify.

Thank you! We've received your feedback.