• Blog
  • Docs
  • Careers
  • Get Support
  • Contact Sales
DigitalOcean
  • Featured AI Products

    Compute

    Build, deploy, and scale cloud compute resources

    Containers and Images

    Safely store and manage containers and backups

    Managed Databases

    Fully managed resources running popular database engines

    Management and Dev Tools

    Control infrastructure and gather insights

    Networking

    Secure and control traffic to apps

    Security

    Help protect your account and resources with these security features

    Storage

    Store and access any amount of data reliably in the cloud

    Browse all products

  • AI/ML

    CMS

    Data and IoT

    Developer Tools

    Gaming and Media

    Hosting

    Security and Networking

    Startups and SMBs

    Web and App Platforms

    See all solutions

  • Community

    Documentation

    Developer Tools

    Get Involved

    Utilities and Help

  • Become a Partner

    Marketplace

  • Pricing
  • Log in
  • Sign up
  • Log in
  • Sign up

Company

  • About
  • Leadership
  • Blog
  • Careers
  • Customers
  • Partners
  • Referral Program
  • Affiliate Program
  • Press
  • Legal
  • Privacy Policy
  • Security
  • Investor Relations

Products

  • GPU Droplets
  • Bare Metal GPUs
  • Inference Engine
  • Data & Learning
  • Evaluations
  • Model Library
  • Droplets
  • Kubernetes
  • Functions
  • App Platform
  • Load Balancers
  • Managed Databases
  • Spaces
  • Block Storage
  • Network File Storage
  • API
  • Uptime
  • Cloud Security Posture Management (CSPM)
  • Identity and Access Management (IAM)
  • Cloudways
  • View all Products

Resources

  • Community Tutorials
  • Community Q&A
  • CSS-Tricks
  • Write for DOnations
  • Currents Research
  • DigitalOcean Startups
  • Wavemakers Program
  • Compass Council
  • Open Source
  • Newsletter Signup
  • Marketplace
  • Pricing
  • Pricing Calculator
  • Documentation
  • Release Notes
  • Code of Conduct
  • Shop Swag

Solutions

  • AI Training GPU
  • GPU Inference
  • VPS Hosting
  • Website Hosting
  • VPN
  • Docker Hosting
  • Node.js Hosting
  • Web Mobile Apps
  • WordPress Hosting
  • Virtual Machines
  • View all Solutions

Contact

  • Support
  • Sales
  • Report Abuse
  • System Status
  • Share your ideas

Company

  • About
  • Leadership
  • Blog
  • Careers
  • Customers
  • Partners
  • Referral Program
  • Affiliate Program
  • Press
  • Legal
  • Privacy Policy
  • Security
  • Investor Relations

Products

  • GPU Droplets
  • Bare Metal GPUs
  • Inference Engine
  • Data & Learning
  • Evaluations
  • Model Library
  • Droplets
  • Kubernetes
  • Functions
  • App Platform
  • Load Balancers
  • Managed Databases
  • Spaces
  • Block Storage
  • Network File Storage
  • API
  • Uptime
  • Cloud Security Posture Management (CSPM)
  • Identity and Access Management (IAM)
  • Cloudways
  • View all Products

Resources

  • Community Tutorials
  • Community Q&A
  • CSS-Tricks
  • Write for DOnations
  • Currents Research
  • DigitalOcean Startups
  • Wavemakers Program
  • Compass Council
  • Open Source
  • Newsletter Signup
  • Marketplace
  • Pricing
  • Pricing Calculator
  • Documentation
  • Release Notes
  • Code of Conduct
  • Shop Swag

Solutions

  • AI Training GPU
  • GPU Inference
  • VPS Hosting
  • Website Hosting
  • VPN
  • Docker Hosting
  • Node.js Hosting
  • Web Mobile Apps
  • WordPress Hosting
  • Virtual Machines
  • View all Solutions

Contact

  • Support
  • Sales
  • Report Abuse
  • System Status
  • Share your ideas
© 2026 DigitalOcean, LLC.Sitemap.
Product updates

More Ways to Work with Load Balancers

author

By Rafael Rosa

  • Published: March 15, 2017
  • 5 min read
<- Back to blog home

When building new products at DigitalOcean, one of our goals is to ensure that they’re simple to use and developer friendly. And that goes beyond the control panel; we aim to provide intuitive APIs and tools for each of our products. Since the release of Load Balancers last month, we’ve worked to incorporate them into our API client libraries and command line client. We’ve also seen community-supported open source projects extended to support Load Balancers.

Today, we want to share several new ways you can interact with Load Balancers.

Command Line: doctl

doctl is our easy-to-use, official command line client. Load Balancer support landed in version v1.6.0. You can download the release from GitHub or install it using Homebrew on Mac:

brew install doctl

You can use doctl for anything you can do in our control panel. For example, here’s how you would create a Load Balancer:

doctl compute load-balancer create --name “example-01” \ --region “nyc3” --tag-name “web:prod” \ --algorithm “round_robin” \ --forwarding-rules \ “entry_protocol:http,entry_port:80,target_protocol:http,target_port:80”

Find doctl’s full documentation in this DigitalOcean tutorial.

Go: godo

We’re big fans of Go, and godo is the way to interact with DigitalOcean using Go. Load Balancer support is included in the recently tagged v1.0.0 release. Here’s an example:

createRequest := &godo.LoadBalancerRequest{ Name: “example-01”, Algorithm: “round_robin”, Region: “nyc3”, ForwardingRules: []godo.ForwardingRule{ { EntryProtocol: “http”, EntryPort: 80, TargetProtocol: “http”, TargetPort: 80, }, }, HealthCheck: &godo.HealthCheck{ Protocol: “http”, Port: 80, Path: “/”, CheckIntervalSeconds: 10, ResponseTimeoutSeconds: 5, HealthyThreshold: 5, UnhealthyThreshold: 3, }, StickySessions: &godo.StickySessions{ Type: “none”, }, Tag: “web:prod”, RedirectHttpToHttps: false, } lb, _, err := client.LoadBalancers.Create(ctx, createRequest)

The library’s full documentation is available on GoDoc.

Ruby: droplet_kit

droplet_kit is our Ruby API client library. Version 2.1.0 has Load Balancer support and is now available on Rubygems. You can install it with this command:

gem install droplet_kit

And you can create a new Load Balancer like so:

load_balancer = DropletKit::LoadBalancer.new( name: ‘example-lb-001’, algorithm: ‘round_robin’, tag: ‘web:prod’, redirect_http_to_https: true, region: ‘nyc3’, forwarding_rules: [ DropletKit::ForwardingRule.new( entry_protocol: ‘http’, entry_port: 80, target_protocol: ‘http’, target_port: 80, certificate_id: ‘’, tls_passthrough: false ) ], sticky_sessions: DropletKit::StickySession.new( type: ‘none’, cookie_name: ‘’, cookie_ttl_seconds: nil ), health_check: DropletKit::HealthCheck.new( protocol: ‘http’, port: 80, path: ‘/’, check_interval_seconds: 10, response_timeout_seconds: 5, healthy_threshold: 5, unhealthy_threshold: 3 ) ) client.load_balancers.create(load_balancer)

Community Supported

Besides our official open source projects, there are two community contributions we’d like to highlight:

-

HashiCorp’s declarative infrastructure tool, Terraform, added the digitalocean_loadbalancer resource shortly after the launch of Load Balancers. It’s now available in their v0.8.8 release.

-

Lorenzo Setale’s Python API client library, python-digitalocean, shipped Load Balancer support in yesterday’s v1.11 release. It can be installed using PIP: `pip install -U python-digitalocean`

Thanks to our colleagues Viola and Andrew for working on these features, and the open source community for including Load Balancer support in their projects. In particular, we want to give a special shout out to Paul Stack and the rest of our friends at HashiCorp who added support to Terraform so quickly. You rock!

We’re excited to see more tools add Load Balancer support. If you’re the maintainer of a project that has added support, Tweet us @digitalocean. We can help spread the word!

Rafael Rosa

Product Manager, High Availability

About the author

Rafael Rosa
Rafael Rosa
Author

Share

  • Product Updates

Start building today

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.
Sign up

Related Articles

DigitalOcean Evaluations: Production Model and Router Testing for the Inference Stack
Product updates

DigitalOcean Evaluations: Production Model and Router Testing for the Inference Stack

Grace Morgan
  • July 1, 2026
  • 3 min read

Read more

Run Codex in the cloud – DigitalOcean for Codex is now available
Product updates

Run Codex in the cloud – DigitalOcean for Codex is now available

Ari Sigal
  • June 25, 2026
  • 3 min read

Read more

Server-Side Tools Are Now Available for DigitalOcean Inference Engine
Product updates

Server-Side Tools Are Now Available for DigitalOcean Inference Engine

Grace Morgan
  • June 17, 2026
  • 3 min read

Read more