DAAKYI Cloud
|

Developer Documentation

Build on DAAKYI Cloud

DocsNetworkingLoad Balancer

Load Balancer

Distribute traffic across VM pools with health checks and SSL termination.

View Service Details

The platform load balancer distributes incoming connections across a pool of backend VMs, removes unhealthy backends automatically, and can terminate SSL so certificates are managed in one place instead of on every VM.

Modes

LayerProtocolsFeatures
Layer 4TCP / UDPHighest throughput; connection-level balancing for databases, mail, custom protocols
Layer 7HTTP / HTTPSSSL termination, host- and path-based routing, session persistence (cookie), WebSocket support

Setting Up an HTTPS Load Balancer

1

Create the load balancer

Networking → Load Balancers → Create. Choose internal (private VIP inside the VPC) or public (attached elastic IP).

2

Add a listener

Listener HTTPS :443. Upload your certificate and key, or select one already stored in the certificate manager.

3

Define the backend pool

Add your web VMs on port 8080 (or wherever the app listens). Choose an algorithm: round-robin, weighted, or least-connections.

4

Configure the health check

HTTP GET /healthz every 10 seconds, 3 failures to eject, 2 successes to restore. Unhealthy VMs stop receiving traffic automatically.

Session Persistence

For applications that keep session state in memory, enable cookie-based persistence so a client keeps hitting the same backend. Stateless applications should leave it off for the most even distribution.

bash
# Create a load balancer via API
curl -X POST "https://api.daakyicloud.com/v1/load-balancers" \
  -H "Authorization: Bearer $TOKEN" \
  -d '{
    "name": "web-lb",
    "vpc_id": "vpc-9d1c",
    "scheme": "public",
    "listeners": [{
      "protocol": "https", "port": 443, "certificate_id": "cert-11aa",
      "backend": {"port": 8080, "algorithm": "least_connections",
                   "health_check": {"path": "/healthz", "interval_s": 10}}
    }]
  }'

Load balancer + two VMs with anti-affinity (kept on different hosts) is the standard minimum pattern for a service that stays up through host failure and rolling deployments.

We use essential cookies to make this site work, and optional analytics cookies to improve it. See our Privacy Policy.