RunpodR
Runpod10mo ago
4 replies
zfmoodydub

RunPod Serverless Inter-Service Communication: Gateway Authentication Issues

I'm developing an application with two RunPod serverless endpoints that need to communicate with each other:

Service A: A Node.js/Express API that receives requests and dispatches processing tasks
Service B: A Python processor that handles data and needs to notify Service A when complete

Service B successfully processes data but cannot reliably notify Service A about completion:

Direct HTTP calls between services fail with connection errors:

Error: HTTPConnectionPool(host='localhost', port=8000): Max retries exceeded with url: /api/webhook/completion (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object>: Failed to establish a new connection: [Errno 111] Connection refused'))

RunPod API Gateway calls result in authentication failures (401):
CopyGateway response status: 401
Gateway error: 401

Interestingly, manual API Gateway requests with identical payloads and headers work correctly.

Core Questions

Is there a networking limitation preventing direct connections between serverless containers? If so, what's the proper way to route traffic between them?
When using the RunPod API Gateway to proxy a webhook request from one serverless endpoint to another, are there specific headers or formats that must be used for authentication to work correctly?

I need to understand the proper pattern for inter-service communication in RunPod serverless environments and the correct authentication mechanism when using the API Gateway as an intermediary.
Was this page helpful?