Codespot Mobile
Workflows

dns load balancing and global load balancer design

03
Design pool

Design a pool with health checks

You need a pool of backends that share traffic. The agent reads your notes, drafts the configuration file, and runs your test command to verify the syntax before you apply it.

01

Open folder

Open the project folder in the chat.

02

Read config

Read the current config file to see existing backends.

03

Draft changes

Write the new pool configuration with health checks.

04

Verify syntax

Run the config test command to check for errors.

Example configuration

lb-plan.yaml
# Load balancer pool config
# Algorithm: round robin
pool:
  name: web-pool
  algorithm: round_robin
  backends:
    - addr: 10.0.0.1
      port: 8080
    - addr: 10.0.0.2
      port: 8080
    - addr: 10.0.0.3
      port: 8080
  health_check:
    path: /health
    interval: 10s
    fail_threshold: 3
    pass_threshold: 2
  standby:
    - addr: 10.0.0.4
      port: 8080

This yaml file defines a pool with three active backends and one standby server, including health check parameters.

Verify failover on your own systems

Draft the failover plan

The agent uses list_dir to see your folder structure and read_file to inspect your current notes or configuration files so you understand the layout. grep finds the specific ports. edit_file adds a standby server to handle traffic if one backend fails. You see a diff card showing exactly what will change in the pool. Shell runs your configuration test command and reports the exit code. Switch to Plan only mode to see the full sequence of changes without executing them. dns load balancing helps manage traffic, and you can verify dual wan failover with static ip during testing. Each action appears in the chat as a card with its real result.

Test the failover manually

The reader stops one backend in a planned window and the agent uses http_get to check the health page of the remaining backends. It checks the stopped backend. The agent uses write_file to update your runbook with the test results. DNS caching can delay failover for the TTL duration significantly. The agent records these results in the chat interface clearly. This verifies that the global load balancer configuration is correct. You verify traffic failover to another link by starting the backend again now. The agent checks that it returns to the pool fully.

Codespot Mobile for Windows

Start designing your pool today

Download Codespot Mobile ↗