Diarkis Server Environment Variables

Diarkis server may be configured using the environment variable.

This allows the server to configure itself to its environment without changing the code or configuration files.

  • DIARKIS_SHUTDOWN_TIMEOUT
    • This is used to configure server shutdown timeout for server auto-scaling.
    • Diarkis server process has a timeout (in seconds) before shutting down the process when instructed to shutdown (receives SIGTERM).
      The default timeout is 10 seconds.
      In order to configure the shutdown timeout, you need to set env to DIARKIS_SHUTDOWN_TIMEOUT=<shutdown timeout in seconds>.
  • DIARKIS_CLOUD_ENV
    • Configures the server's public endpoint (UDP/RUDP, TCP, WebSocket) according to the cloud platform.
      • GCP - This is used when the Diarkis server runs on the Google Cloud environment.
      • AWS - This is used when the Diarkis server runs on the Amazon Web Service environment.
      • AZURE - This is used when the Diarkis server runs on the Microsoft Azure envirronemnt.
  • DIARKIS_MARS_ADDR
    • Configures the MARS server address for the Diarkis server to connect to.
  • DIARKIS_MARS_PORT
    • Configures the MARS server port for the Diarkis server to connect to.
  • DIARKIS_NODE_TYPE
    • Diarkis server can be named and grouped by "node type".  By default "node type" is assigned by the server's network protocol e.i. UDP, TCP, HTTP, etc.
  • DIARKIS_STACKDRIVER_LOG
    • Configures Diarkis server's logger to apply JSON format for Stackdriver.
  • DIARKIS_CLIENT_KEY
    • When the client key is assigned to the server, the clients that connect to the server have to send the matching client key in order to connect to the server.