• Docs
  • Changelog
Sign in
Get started
    • Home
    • Your first deploy
    • Free instances
    • Platform features by plan
    • Use with coding agents
    • FAQ
    • Templates
      • Migrate from…
        • Heroku
        • Railway
    • Compute plans
    • SandboxesBeta
      • Service types
        • Which to use?
        • Static sites
        • Web services
        • Private services
        • Background workers
        • Cron jobs
        • Workflows
        • Multi-service architectures
      • Data storage
        • Render Postgres
        • Render Key Value (Redis®-compatible)
        • Persistent disks
    • How deploys work
    • Supported languages
    • Git providers (GitHub, etc.)
    • Build pipeline
    • Deploy hooks
    • Monorepo support
    • Troubleshooting deploys
      • Previewing changes
        • Single-service previews
        • Preview environments (multi-service)
      • Docker deploys
        • Overview
        • Deploy a registered image
        • Using secrets
      • Runtime
        • Native runtimes
        • Environment variables & secrets
        • Default environment variables
    • Intro to sandboxes
    • Limits
      • How to…
        • Create & configure sandboxes
        • Execute commands
        • Manage files
        • Manage snapshots
      • Use with…
        • Claude Managed Agents
        • Cursor Cloud Agents
        • OpenAI Agents API
      • SDK/CLI reference
        • TypeScript SDK
        • Python SDK
        • CLI commands
    • Intro to workflows
    • Tutorial
    • Limits & pricing
      • How to…
        • Define tasks
        • Define flowsNew
        • Trigger runs
        • Develop locally
      • SDK reference
        • TypeScript SDK
        • Python SDK
      • Example workflows
        • TypeScript examples
        • Python examples
    • Overview
    • Create & connect
    • Database credentials
    • Extensions
    • Version upgrades
    • Logical replication
    • Legacy instance types
      • Database recovery
        • Recovery & backups
        • High availability
      • Database performance
        • Read replicas
        • Connection pooling
        • Admin apps
        • Repacking tables
        • Troubleshooting performance
    • Regions
    • Inbound IP rules
    • Edge caching
    • WebSockets
    • TLS certificates
      • Custom domains
        • Overview
        • Cloudflare
        • Namecheap
        • Other DNS providers
      • Internal traffic
        • Private network
        • Private links
      • Outbound traffic
        • Default IP ranges
        • Dedicated IP addresses
        • Outbound bandwidth
        • Handling network changes
      • Static site config
        • Custom response headers
        • Redirects & rewrites
    • The Render Dashboard
    • SSH / Shell access
    • Projects & environments
      • Service actions
        • Scaling
        • Rollbacks
        • Maintenance mode
        • One-off jobs
      • Infrastructure as code
        • Blueprints overview
        • render.yaml reference
        • Terraform provider
    • In-dashboard metrics
    • Health checks
    • Uptime best practices
      • Logging
        • In-dashboard logs
        • Log streams (syslog/HTTPS)
      • OpenTelemetry (OTel) metrics
        • Provider setup
        • Metrics reference
      • Notifications
        • Webhooks
        • Email / Slack
    • MCP Server
      • Render CLI
        • Overview
        • Command reference
      • REST API
        • Overview
        • API reference
      • Third-party connections
        • OIDC support
        • Datadog
    • Workspaces, members, & roles
    • Login settings
    • Audit logs
      • Organizations
        • Overview
        • SAML SSO
    • DDoS protection
    • Platform maintenance
      • Compliance
        • Overview
        • HIPAA (US health data)
        • HIPAA best practices
        • Shared responsibility model
        • Pentest policy
    • Heroku vs Render
    • Vercel vs Render

Deploy a Sidekiq Worker

In the course of processing web requests, you might want to offload tasks to an asynchronous, background process (typically called a worker). Render makes this easy to do via the background worker service type.

For this quick start, we'll use Sidekiq, a popular task processing framework for Ruby, and the Sinatra example in Sidekiq's official repo.

Sidekiq uses Redis for its processing backend, so we'll set up a Redis service first.

Deploy to Render

There are two ways to deploy your application on Render, either by declaring your services within your repository in a render.yaml file, or by manually setting up your services using the dashboard. In the following steps, we will walk you through both options.

Use render.yaml to Deploy

  1. You can fork our render-examples/sidekiq on GitHub which contains a render.yaml file that sets up a background worker alongside a Redis instance and a web service.
  2. On the Render Dashboard, go to the Blueprint page and click the New Blueprint Instance button. Select your repository (after giving Render the permission to access it, if you haven’t already). Or alternatively, you can click the Deploy To Render button in the README of the forked repo.
  3. In the deploy window, click Approve.

That's it! Your app will be live on your .onrender.com URL as soon as the build finishes. Try out the web service using the web service Render URL and play around with the small application.

Deploy manually

  1. Create a new Redis instance on Render and copy the internal Redis URL to use below. The internal Redis URL will look like red-xxxxxxxxxxxxxxxxxxxx:6379.

  2. Fork render-examples/sidekiq on GitHub and create a new Background Worker using your repo and the following values:

    LanguageRuby
    Build Commandbundle install
    Start Commandbundle exec sidekiq -r ./main.rb

    Also add the following environment variable to your background worker:

    KeyValue
    REDIS_URL<redis-connection-string>, where <redis-connection-string> is the string from step 1.
  3. Create a new Web Service using the same repo you created in Step 2, and the following values:

    LanguageRuby
    Build Commandbundle install
    Start Commandbundle exec ruby main.rb

    Also add the following environment variable to your web service:

    KeyValue
    REDIS_URL<redis-connection-string>, where <redis-connection-string> is the string from step 1.

    This will spin up a new Sinatra web service which you can use to test background message sending. The code uses Sidekiq's API to send the message to your Redis instance, which is the same instance your background worker is listening on. As a result, the worker picks up and processes any messages you send from the frontend.

You can also use a Sidekiq background worker from Rails. See Sidekiq's getting started page for more information.

Deploy a Sidekiq Worker
  • Deploy to Render
  • Use render.yaml to Deploy
  • Deploy manually
All Systems Operational
© Render Inc. All rights reserved.