Dokploy / Dokploy/dokploy

Enhanced Horizontal Scaling: Docker Compose Replicas + Auto-scaling (HPA)

Open
#2,579 6 comments 54 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
TypeScript
Stars
37.4k
Forks
3k
Avg merge
1d 3h
Merged PRs (30d)
73

Description

What problem will this feature address?

Currently, Dokploy supports replicas for some deployment types but not for Docker Compose applications. Additionally, there's no Horizontal Pod Autoscaling (HPA) capability to automatically adjust the number of replicas based on resource utilization or custom metrics.

This creates limitations when:

  • Docker Compose applications need to scale horizontally under load
  • Manual scaling intervention is required during traffic spikes
  • Applications need automatic scaling down during low usage periods
  • Cost optimization through dynamic resource allocation is needed
Describe the solution you'd like
  1. Docker Compose Replica Support:
  • Extend existing replica functionality to Docker Compose applications
  • Allow users to set replica count for services within Docker Compose files
  • Maintain service discovery and load balancing between replicas
  1. Horizontal Pod Autoscaling (HPA):
  • CPU-based autoscaling (scale up when CPU > threshold, scale down when < threshold)
  • Memory-based autoscaling
  • Custom metrics support (HTTP requests/sec, queue length, etc.)
  • Configurable min/max replica limits
Describe alternatives you've considered
  • Manual scaling: Requires constant monitoring and intervention
  • External monitoring + webhooks: Complex setup, breaks Dokploy's simplicity
  • Cloud-specific autoscaling: Vendor lock-in, doesn't work for self-hosted
  • Script-based scaling: Unreliable, hard to maintain
Additional context

This would complete Dokploy's scaling story by:

  • Bringing Docker Compose apps to feature parity with other deployment types
  • Adding intelligent automatic scaling for all supported applications
  • Reducing operational overhead for users
  • Improving resource efficiency and cost management
Will you send a PR to implement it?

Yes

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files, tests, or entry points are named. Start by locating the existing replica functionality and Docker Compose deployment path, then map how scaling is configured for supported deployment types. Done should include configurable Compose service replicas and min/max CPU, memory, and custom-metric autoscaling with service discovery and load balancing.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker-compose, kubernetes, typescript
Domain
devops, infrastructure
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.