Can ray serve handle https requests?

all is in the title :slight_smile: I could not find any information about it in the docs so I am asking it here.

I would like to use ray serve in production but I will need ray to handle and answer requests in HTTPS, will it be possible ?

Thank you for your answer :slight_smile:

Anyone knows ? :slight_smile:

Hi @tim, there are few ways:

  • You can run a proxy in front of it like nginx, traefik, or caddy. Deployment - Uvicorn
    https://caddyserver.com/
  • You can generate ssl key files using letโ€™s encrypt and pass it to serveโ€™s uvicorn. Note that this feature requires some code changes and a PR is more than welcomed! The idea would just be passing the following fields to Serve and let Serve proxy them to uvicorn
  --ssl-keyfile TEXT              SSL key file
  --ssl-certfile TEXT             SSL certificate file
  --ssl-keyfile-password TEXT     SSL keyfile password
  --ssl-version INTEGER           SSL version to use (see stdlib ssl module's)
                                  [default: 2]

  --ssl-cert-reqs INTEGER         Whether client certificate is required (see
                                  stdlib ssl module's)  [default: 0]

  --ssl-ca-certs TEXT             CA certificates file
  --ssl-ciphers TEXT              Ciphers to use (see stdlib ssl module's)
                                  [default: TLSv1]

If you want to contribute feel free to open a github issue and tag me! I will be happy to give more pointers about where to add them :slight_smile: