Azure / aoai-smart-loadbalancing

Smart load balancing for Azure OpenAI endpoints
MIT License
75 stars 26 forks source link

Health check issues #10

Open vikiscience opened 5 months ago

vikiscience commented 5 months ago

Hi All,

I'm deploying the LB in AKS with 1-2 Azure OpenAI accounts in the backend, as described in the docs. However, my pod is always in the "CrashLoopBackOff" state with the following error:

info: Yarp.ReverseProxy.Forwarder.HttpForwarder[9]
      Proxying to https://XXX.openai.azure.com/ HTTP/2 RequestVersionOrLower
info: Yarp.ReverseProxy.Forwarder.HttpForwarder[56]
      Received HTTP/2.0 response 404.
info: Yarp.ReverseProxy.Forwarder.HttpForwarder[9]
      Proxying to https://XXX.openai.azure.com/ HTTP/2 RequestVersionOrLower
info: Yarp.ReverseProxy.Forwarder.HttpForwarder[9]
      Proxying to https://XXX.openai.azure.com/ HTTP/2 RequestVersionOrLower
info: Yarp.ReverseProxy.Forwarder.HttpForwarder[56]
      Received HTTP/2.0 response 404.
info: Yarp.ReverseProxy.Forwarder.HttpForwarder[56]
      Received HTTP/2.0 response 404.
...
info: Yarp.ReverseProxy.Forwarder.HttpForwarder[9]
      Proxying to https://XXX.openai.azure.com/ HTTP/2 RequestVersionOrLower
info: Microsoft.Hosting.Lifetime[0]
      Application is shutting down...

Can it be, that the health check is requesting the base URL given by BACKEND_1_URL(=https://XXX.openai.azure.com/), but since AOAI service always responds with 404 to it (as of REST API spec), the proxy crashes? In other words, should the health check URL not be any valid path of the REST API? Or am I missing something?