Using a Reverse Proxy

You can use Transformer with a reverse proxy server, such as Nginx. You might use a reverse proxy server to define user-defined path-based routes to Transformer. You can also use a reverse proxy server for StreamSets Data Collector.

To use a reverse proxy server, you simply configure the reverse proxy server to work with Transformer.

For example, the following Nginx configuration provides access to Transformer on port 19630 and two instances of StreamSets Data Collector, one on port 18630 and one on 18640:

location /transformer/ {
    proxy_pass         http://0.0.0.0:19630/;
    proxy_set_header   Host $host:$server_port;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "Upgrade";
}

location /sdc/ {
    proxy_pass         http://0.0.0.0:18630/;
    proxy_set_header   Host $host:$server_port;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "Upgrade";
}

location /sdc2/ {
    proxy_pass         http://0.0.0.0:18640/;
    proxy_set_header   Host $host:$server_port;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "Upgrade";
}

Similarly, to use an Nginx ingress controller to access Transformer configured to use port 19630 on a Kubernetes cluster, you might use the following configuration:

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: streamsets-transformer
  annotations:
    nginx.ingress.kubernetes.io/ssl-redirect: \"false\"
    nginx.ingress.kubernetes.io/rewrite-target: /$2
spec:
  rules:
    - http:
        paths:
          - path: /transformer(/|$)(.*)
            backend:
              serviceName: streamsets-transformer
              servicePort: 19630

For specific details on configuring a reverse proxy server, see your reverse proxy server documentation.