Internal service-to-service requests should wake scale-to-zero services

Problem

When using scale-to-zero with GPU services (e.g. Ollama on an RTX 4000 or L40), there is no way for another service in the same app to wake the sleeping service via the internal URL (<service>.<app>.internal).

Currently, scale-to-zero only wakes on requests hitting the public route. Internal requests fail silently with fetch failed — the DNS resolves but TCP connections are refused because the sleeping instance is never signaled to start.

Use case

We run a Next.js web app (CPU, fra region) alongside an Ollama GPU service (same app, same region). Anonymous users get the CPU model. When a user authenticates, we want to route them to the GPU model. The web service sends a warmup request to the Ollama service via the internal URL to wake it from scale-to-zero — but this doesn’t work.

The only workaround is using the public URL, which forces us to add authentication to the Ollama service (e.g. OLLAMA_API_KEY) to prevent abuse. This defeats the simplicity of internal networking.

Feature request

  1. Internal wake-up: Allow service-to-service requests on .internal URLs to trigger scale-to-zero wake-up, just like public requests do. This seems like a natural extension — if both services are in the same app and region, internal traffic should be treated as valid wake-up traffic.

  2. Wake-up hooks (nice to have): Provide a mechanism to programmatically wake a sleeping service without sending a full HTTP request. For example:

    • A Koyeb API endpoint: POST /v1/services/{id}/wake

    • Or a webhook/event system: when service A receives a request matching certain criteria, automatically wake service B

Current workaround

Use the public URL with OLLAMA_API_KEY env var to secure the endpoint. This works but adds complexity and exposes the service to the internet unnecessarily.

Environment

  • App: Next.js web + Ollama GPU (same app, same region fra)

  • GPU: RTX 4000 SFF Ada / L40S

  • Scale-to-zero: enabled on GPU service

  • Koyeb internal URL: ollama.<app>.internal:11434