• 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

AboutLeadershipBlogCareersCustomersPartnersReferral ProgramAffiliate ProgramPressLegalPrivacy PolicySecurityInvestor Relations

Products

Managed AgentsKnowledge BasesGPU DropletsBare Metal GPUsInference EngineData ServicesLearning ServicesEvaluationsModel LibraryDropletsKubernetesFunctionsApp PlatformLoad BalancersManaged DatabasesSpacesBlock StorageNetwork File StorageAPIUptimeCloud Security Posture Management (CSPM)Identity and Access Management (IAM)CloudwaysView all Products

Resources

Community TutorialsCommunity Q&AWrite for DOnationsCurrents ResearchDigitalOcean StartupsWavemakers ProgramCompass CouncilOpen SourceNewsletter SignupMarketplacePricingPricing CalculatorDocumentationRelease NotesCode of ConductShop Swag

Solutions

AI Training GPUGPU InferenceVPS HostingWebsite HostingVPNDocker HostingNode.js HostingWeb Mobile AppsWordPress HostingVirtual MachinesView all Solutions

Contact

SupportSalesReport AbuseSystem StatusShare your ideas
AboutLeadershipBlogCareersCustomersPartnersReferral ProgramAffiliate ProgramPressLegalPrivacy PolicySecurityInvestor Relations
Managed AgentsKnowledge BasesGPU DropletsBare Metal GPUsInference EngineData ServicesLearning ServicesEvaluationsModel LibraryDropletsKubernetesFunctionsApp PlatformLoad BalancersManaged DatabasesSpacesBlock StorageNetwork File StorageAPIUptimeCloud Security Posture Management (CSPM)Identity and Access Management (IAM)CloudwaysView all Products
Community TutorialsCommunity Q&AWrite for DOnationsCurrents ResearchDigitalOcean StartupsWavemakers ProgramCompass CouncilOpen SourceNewsletter SignupMarketplacePricingPricing CalculatorDocumentationRelease NotesCode of ConductShop Swag
AI Training GPUGPU InferenceVPS HostingWebsite HostingVPNDocker HostingNode.js HostingWeb Mobile AppsWordPress HostingVirtual MachinesView all Solutions
SupportSalesReport AbuseSystem StatusShare 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

Introducing DigitalOcean Cuttlefish: Get more done with agents on the go
Product updates

Introducing DigitalOcean Cuttlefish: Get more done with agents on the go

DigitalOcean

  • November 5, 2026
  • 4 min read

Read more

DigitalOcean Signals: Observability for AI Agents and Inference
Product updates

DigitalOcean Signals: Observability for AI Agents and Inference

Ravi Verma

  • October 28, 2026
  • 8 min read

Read more

Prompt Caching is GA on DigitalOcean Serverless Inference: Up to 90% Off the Context Your Agents Resend
Product updates

Prompt Caching is GA on DigitalOcean Serverless Inference: Up to 90% Off the Context Your Agents Resend

DigitalOcean
  • October 23, 2026
  • 4 min read

Read more