Skip to main content

Access Doris Data Source through the NineData Gateway

NineData supports accessing Doris data sources through a gateway, allowing you to connect to Doris without providing an external address, even if Doris is in a private or dedicated network environment.

Prerequisites

  • The host where the gateway is deployed must be within the intranet environment of the Doris data source and must be able to access the Doris data source smoothly through the intranet.
  • The host where the gateway is deployed must have internet access. If your host cannot access the internet and is within a local area network, you can deploy a proxy gateway. For more information, see Using a Proxy Gateway.

Step 1: Deploy the Gateway

This step is applicable to hosts that can access the public network. If your host cannot access the public network and is in the local area network, see Using Proxy Gateway to deploy the gateway.

  1. Log in to the NineData console on the host where the gateway needs to be deployed.

  2. In the left navigation pane, click Datasource>Gateway.

  3. Click Create Gateway in the upper right corner of the page.

  4. Configure the parameters based on the following table.

    ParameterDescription
    NameThe name of the gateway. For easy searching and management, manual specification is supported.
    EnvironmentSelect the operating system of the host where the gateway needs to be deployed, and the corresponding gateway installation method is displayed. The following operating systems are supported:
    • Windows(x86_64)
    • Linux(x86_64)
    • macOS
    Access RegionSelect the region closest to the host where the gateway is deployed to obtain relatively fast access speed.
    AdvancedNo configuration required.
  5. Install and configure the gateway on the host of the deployment end based on the installation method displayed below. After the configuration is completed, the connection diagram on the right side of the page changes from Waiting for the local gateway to launch... to The local gateway is connected successfully.

  6. Click on Create Datasource, select the desired data source in the pop-up window, and proceed to Step 2.

Step 2: Access the Doris Data Source

  1. On the Create Datasource page, configure the parameters in the table.

    Parameter
    Description
    NameEnter the name of the data source. Use a meaningful name so you can find and manage the data source later.
    ConnectionSelect Gateway.
    GatewaySelect the gateway ID deployed in Step 1.
    HostEnter the access address and port of the Doris data source.
    • If Doris is installed on the local machine: Enter localhost or 127.0.0.1 on the left and the actual access port of Doris on the right.
    • If Doris is installed on another host within the intranet: Enter the intranet IP of that host on the left and the actual access port of Doris on the right.
    DB AccountEnter the login username for Doris.
    DB PasswordEnter the login password for Doris.
    Access RegionSelect the region closest to your Doris host to effectively reduce network latency.
    EnvironmentSelect the environment that matches the business purpose of the data source. The default provides the PROD and DEV environments, and also supports you to create a custom environment.
    Note: In organization mode, the database environment can also be applied to permission policy management. For example, the default Prod Admin role only supports access to data sources in the PROD environment and cannot access data sources in other environments. For more information, see Managing Roles.
    EncryptionSpecify whether to use SSL encryption to access the data source (enabled by default). If the data source requires SSL encrypted connections, keep this option enabled or the connection fails.
    Use the switch on the right to enable or disable encrypted transmission. Click > to the left of Encryption to expand the detailed settings.
    • SSL Options: Supports the following two options.
      • If Available: Automatically detects the server SSL status. If SSL is enabled, NineData connects over SSL first; otherwise, it uses a non-SSL connection.
      • Require: Always connects to the data source over SSL. If the server does not support SSL or the SSL connection cannot be established, the connection fails.
    • SSL Cipher: Specify the SSL-Cipher encryption algorithm.
    • Verify Server Certificate (SSL CA): If the Doris server uses a certificate issued by a self-signed CA, upload the root certificate of that CA.
    • Verify Server Identity (SSL Identify): Verify the server name and IP address to ensure that the connection reaches the genuine Doris server and helps prevent man-in-the-middle attacks.
    • Authenticate Client: If the Doris server requires a client certificate, upload the client certificate and key. The Doris server verifies the uploaded information to secure the connection.
    Note: In most cases, if the Doris server supports SSL encrypted connections, you only need to select Require. No other configuration is required. The system automatically generates a key for the connection.
  2. After configuring the parameters, click Connection Test next to Create Datasource to verify that NineData can reach the data source. When Connection Successfully appears, click Create Datasource to add the data source. If the test fails, review the connection settings and run the test again.

Appendix: Using a Proxy Gateway

If the host where the gateway needs to be deployed cannot access the public network, a proxy gateway is needed. You need to prepare two hosts in the same LAN that can access each other:

  • Host A: A host that can access the public network.
  • Host B: The host where the gateway needs to be deployed.

Create a gateway in Host A. The role of this gateway is to act as a proxy so that Host B can connect to the NineData server through the proxy.

Procedure

  1. Log in to the NineData console on Host A.

  2. In the left navigation bar, click Datasource > Gateway.

  3. Click Create Gateway in the upper right corner of the page.

  4. Configure the parameters according to the following table.

    ParameterDescription
    NameThe name of the gateway, which can be manually specified for easy search and management.
    EnvironmentSelect the operating system of the host where the gateway needs to be deployed, and the corresponding gateway installation method will be displayed. The following operating systems are supported:
    • Windows (x86_64)
    • Linux (x86_64)
    • macOS
    Access RegionSelect the region closest to the host where the gateway is deployed to obtain relatively fast access speed.
    AdvancedNo need to configure.
  5. Install and configure the gateway in Host A according to the installation method displayed below. After the configuration is completed, the connection diagram on the right side of the page will change from Waiting for the local gateway to launch... to The local gateway is connected successfully.

  6. Click Completed and back to List, and then click Create Gateway in the upper right corner of the page again.

  7. In Environment, select the operating system of Host B.

  8. Click Advanced, select Use Proxy, and click the drop-down box below Proxy. Select the gateway created in Host A from the drop-down menu.

    tip

    At this point, the gateway process will automatically open a port on Host A for Host B's access. When the page prompts "xxx has enabled proxy function, port xxx", it means that the proxy gateway has been successfully opened.

  9. Install the gateway on Host B according to the installation steps displayed below.

  10. Wait for the connection diagram on the right side of the page to change from Waiting for the local gateway to launch... to The local gateway is connected successfully.

  11. Click Create Datasource to enter Step 2.