Customising PhariaAI proxies for larger requests

Some PhariaAI features — such as PhariaAssistant Summarization — can produce requests that are large or require long-lived connections. PhariaAI comes configured with suitable defaults that optimise between functionality and error detection.

This article describes how you can customise these defaults for your use case.

These annotations are specific to the NGINX Ingress Controller. If you are using a different ingress controller, refer to its documentation for equivalent settings.


Setting PhariaAssistant proxy rules

pharia-assistant:
  ingress:
    annotations:
        nginx.ingress.kubernetes.io/proxy-body-size: "20m"           # Allow up to 20MB requests
        nginx.ingress.kubernetes.io/proxy-read-timeout: "300"        # 5 minutes timeout

Parameter descriptions

  • nginx.ingress.kubernetes.io/proxy-body-size: Increases the maximum request size. Adjust the value (for example, 20m) as needed for your use case.

  • nginx.ingress.kubernetes.io/proxy-read-timeout: Increases the time NGINX waits for a response from the backend. Set this to a value (in seconds) that matches your expected workload.

Setting PhariaOS applications proxy rules

phariaos-manager:
   applicationsProxy:
    ingress:
      annotations:
        nginx.ingress.kubernetes.io/proxy-body-size: "20m"           # Allow up to 20MB requests
        nginx.ingress.kubernetes.io/proxy-read-timeout: "300"        # 5 minutes timeout

Parameter descriptions

  • nginx.ingress.kubernetes.io/proxy-body-size: Increases the maximum request size. Adjust the value (for example, 20m) as needed for your use case.

  • nginx.ingress.kubernetes.io/proxy-read-timeout: Increases the time NGINX waits for a response from the backend. Set this to a value (in seconds) that matches your expected workload.

Setting PhariaInference API proxy rules

inference-api:
    ingress:
    annotations:
        nginx.ingress.kubernetes.io/proxy-body-size: "200m"           # Allow up to 200 MB requests
        nginx.ingress.kubernetes.io/proxy-read-timeout: "1800"        # 30 minutes timeout for reading response
        nginx.ingress.kubernetes.io/proxy-send-timeout: "1800"        # 30 minutes timeout for sending request
        nginx.ingress.kubernetes.io/proxy-connect-timeout: "120"      # 2 minutes timeout for establishing connection

Parameter descriptions

  • nginx.ingress.kubernetes.io/proxy-body-size: Increases the maximum request size. Adjust the value (for example, 20m) as needed for your use case.

  • nginx.ingress.kubernetes.io/proxy-read-timeout: Increases the time NGINX waits for a response from the backend. Set this to a value (in seconds) that matches your expected workload.

  • nginx.ingress.kubernetes.io/proxy-send-timeout: Sets the timeout for sending a request to the proxy server. Adjust this value (in seconds) based on your expected request size and network conditions.

  • nginx.ingress.kubernetes.io/proxy-connect-timeout: Sets the timeout for establishing a connection to the proxy server. Adjust this value (in seconds) based on your network latency and connection requirements.