All Products
Document Center

What do I do if I want to use a proxy to connect a DBGateway to DAS

Last Updated: Jul 07, 2020

This topic provides a solution for you solve the following network connectivity issues.

  • After you create security domains, a direct connection cannot be established between a DBGateway and the endpoint of Database Autonomy Service (DAS).
  • A DBGateway is connected to the DAS endpoint over the Internet, and the network connection is intermittent and even interrupted. You want to use an internal channel to connect the DBGateway to the NGINX server. The NGINX server then forwards data to the DAS endpoint.

NGINX deployment solution


  1. wget
  2. tar -zxvf nginx-1.17.4.tar.gz
  3. cd nginx-1.17.4
  4. # Compile and install the NGINX server. Specify the corresponding configuration parameter to support the stream module.
  5. ./configure --with-http_ssl_module --with-http_v2_module --with-stream
  6. make
  7. sudo make install
  8. # By default, the NGINX server is installed in the /usr/local/nginx/ directory. Specify the configurations.
  9. sudo sh -c bash
  10. cat << EOF > /usr/local/nginx/conf/hdm-master.conf
  11. worker_processes auto;
  12. events {
  13. worker_connections 1024;
  14. }
  15. stream {
  16. upstream backend {
  17. # DAS endpoint
  18. server max_fails=3 fail_timeout=30s;
  19. hash $remote_addr consistent;
  20. }
  21. server {
  22. listen 80;
  23. # We recommend that you specify a time-out period that is longer than 7 seconds. This helps you prevent connection time-out errors for the DBGateway.
  24. proxy_connect_timeout 10s;
  25. proxy_timeout 10s;
  26. proxy_pass backend;
  27. }
  28. }
  29. EOF
  30. # Run the NGINX server.
  31. sudo /usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/hdm-master.conf