Metropolis Microservices Platform services API gateway






The Ingress service is a message broker that uses the request URL to determine to which service a request is meant and forwards the request to it. For example when making a request to VST the URL will be of the form:

localhost:30080/vst/

The ingress service will check the vst postfix and redirect the request to said service.

Configuration

Any other service can be added to ingress to take advantage of it, by adding a config file to the path /opt/nvidia/jetson/services/ingress/config/. For example we are creating a new service called mysrv, we create a new file called mysrc-nginx.conf on /opt/nvidia/jetson/services/ingress/config/ that looks like so:

location /mysrv/ {
    rewrite ^/mysrv/?(.*)$ /$1 break;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    access_log /var/log/nginx/access.log timed_combined;
    proxy_pass http://localhost:5010;
}

With that we can use our service that is running on the port 5010, by sending requests to the URL localhost:30080/mysrv.