# Fix Envoy Rate Limit Docker Image Issues

You're trying to deploy the Envoy rate limit service using the envoyproxy/ratelimit Docker image, but encountering issues with image pulls, configuration, or runtime errors.

The Envoy rate limit service is a Go-based service that provides distributed rate limiting for Envoy proxies. Let's troubleshoot common issues.

Introduction

This article covers troubleshooting steps and solutions for Fix Envoy Rate Limit Docker Image Issues. The error typically occurs in production environments and can cause service disruptions if not addressed promptly.

Symptoms

Common error messages include:

```bash # List available tags (requires skopeo or crane) crane ls envoyproxy/ratelimit

# Or check Docker Hub curl -s "https://hub.docker.com/v2/repositories/envoyproxy/ratelimit/tags?page_size=50" | jq '.results[].name' ```

```bash docker pull envoyproxy/ratelimit:latest

# Or specific version docker pull envoyproxy/ratelimit:v1.4.0 ```

bash
docker inspect envoyproxy/ratelimit:latest

Common Causes

  • Configuration misconfiguration
  • Missing or incorrect credentials
  • Network connectivity issues
  • Version compatibility problems
  • Resource exhaustion or limits
  • Permission or access denied

Step-by-Step Fix

Check if the image exists and available tags: # List available tags (requires skopeo or crane) crane ls envoyproxy/ratelimit

# Or check Docker Hub curl -s "https://hub.docker.com/v2/repositories/envoyproxy/ratelimit/tags?page_size=50" | jq '.results[].name' ```

Pull the image:

```bash docker pull envoyproxy/ratelimit:latest

# Or specific version docker pull envoyproxy/ratelimit:v1.4.0 ```

Check image details:

bash
docker inspect envoyproxy/ratelimit:latest

Run basic health check:

bash
docker run --rm envoyproxy/ratelimit:latest --help

Common Issues and Solutions

Issue 1: Image Pull Timeout

If pulling from Docker Hub times out:

```bash # Error: docker pull timeout registry-1.docker.io # Solution: Use mirror or retry with longer timeout

docker pull --retry 3 envoyproxy/ratelimit:latest

# Or use a mirror docker pull docker.io/envoyproxy/ratelimit:latest ```

Configure Docker daemon with mirror:

json
# /etc/docker/daemon.json
{
  "registry-mirrors": [
    "https://mirror.gcr.io",
    "https://registry.docker-cn.com"
  ]
}

Issue 2: Missing Configuration

The rate limit service requires configuration files:

```bash # Create config directory mkdir -p /etc/ratelimit/config

# Create basic config cat > /etc/ratelimit/config/config.yaml << 'EOF' domain: my-domain descriptors: - key: generic_key value: default rate_limit: unit: second requests_per_unit: 100 EOF ```

Run with configuration:

bash
docker run -d \
  --name ratelimit \
  -v /etc/ratelimit/config:/data/ratelimit/config \
  -e RUNTIME_ROOT=/data \
  -e RUNTIME_SUBDIRECTORY=ratelimit \
  -p 8080:8080 \
  -p 6070:6070 \
  envoyproxy/ratelimit:latest

Issue 3: Redis Connection Required

Rate limit service requires Redis for distributed rate limiting:

```bash # Start Redis docker run -d --name redis redis:alpine

# Run rate limit with Redis docker run -d \ --name ratelimit \ --link redis:redis \ -e REDIS_SOCKET_TYPE=tcp \ -e REDIS_TCP_HOST=redis \ -e REDIS_TCP_PORT=6379 \ -v /etc/ratelimit/config:/data/ratelimit/config \ -e RUNTIME_ROOT=/data \ -e RUNTIME_SUBDIRECTORY=ratelimit \ -p 8080:8080 \ -p 6070:6070 \ envoyproxy/ratelimit:latest ```

Issue 4: Port Configuration

The rate limit service uses multiple ports:

```bash # Port 8080 - GRPC for Envoy # Port 6070 - HTTP debug/admin

docker run -d \ --name ratelimit \ -e REDIS_SOCKET_TYPE=tcp \ -e REDIS_TCP_HOST=redis \ -e REDIS_TCP_PORT=6379 \ -p 8080:8080 \ -p 6070:6070 \ envoyproxy/ratelimit:latest

# Check health curl http://localhost:6070/healthcheck ```

Issue 5: Kubernetes Deployment

Deploy to Kubernetes with proper configuration:

yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: ratelimit
spec:
  replicas: 2
  selector:
    matchLabels:
      app: ratelimit
  template:
    metadata:
      labels:
        app: ratelimit
    spec:
      containers:
      - name: ratelimit
        image: envoyproxy/ratelimit:v1.4.0
        ports:
        - containerPort: 8080
        - containerPort: 6070
        env:
        - name: REDIS_SOCKET_TYPE
          value: "tcp"
        - name: REDIS_TCP_HOST
          value: "redis-service"
        - name: REDIS_TCP_PORT
          value: "6379"
        - name: RUNTIME_ROOT
          value: "/data"
        - name: RUNTIME_SUBDIRECTORY
          value: "ratelimit"
        volumeMounts:
        - name: config
          mountPath: /data/ratelimit/config
        livenessProbe:
          httpGet:
            path: /healthcheck
            port: 6070
          initialDelaySeconds: 5
          periodSeconds: 5
      volumes:
      - name: config
        configMap:
          name: ratelimit-config
---
apiVersion: v1
kind: ConfigMap
metadata:
  name: ratelimit-config
data:
  config.yaml: |
    domain: my-domain
    descriptors:
      - key: generic_key
        value: default
        rate_limit:
          unit: second
          requests_per_unit: 100
---
apiVersion: v1
kind: Service
metadata:
  name: ratelimit
spec:
  selector:
    app: ratelimit
  ports:
  - name: grpc
    port: 8080
    targetPort: 8080
  - name: http
    port: 6070
    targetPort: 6070

Issue 6: Envoy Configuration

Configure Envoy to use the rate limit service:

```yaml # Envoy configuration static_resources: listeners: - name: listener_0 address: socket_address: address: 0.0.0.0 port_value: 10000 filter_chains: - filters: - name: envoy.filters.network.http_connection_manager typed_config: "@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager stat_prefix: ingress_http route_config: name: local_route virtual_hosts: - name: local_service domains: ["*"] routes: - match: prefix: "/" route: cluster: service http_filters: - name: envoy.filters.http.ratelimit typed_config: "@type": type.googleapis.com/envoy.extensions.filters.http.ratelimit.v3.RateLimit domain: my-domain failure_mode_deny: false rate_limit_service: grpc_service: envoy_grpc: cluster_name: ratelimit - name: envoy.filters.http.router

clusters: - name: ratelimit type: STATIC lb_policy: ROUND_ROBIN typed_extension_protocol_options: envoy.extensions.upstreams.http.v3.HttpProtocolOptions: "@type": type.googleapis.com/envoy.extensions.upstreams.http.v3.HttpProtocolOptions explicit_http_config: http2_protocol_options: {} load_assignment: cluster_name: ratelimit endpoints: - lb_endpoints: - endpoint: address: socket_address: address: ratelimit port_value: 8080 - name: service type: STATIC lb_policy: ROUND_ROBIN load_assignment: cluster_name: service endpoints: - lb_endpoints: - endpoint: address: socket_address: address: 127.0.0.1 port_value: 8081 ```

Issue 7: Debug Logging

Enable debug logging:

```bash docker run -d \ --name ratelimit \ -e REDIS_SOCKET_TYPE=tcp \ -e REDIS_TCP_HOST=redis \ -e REDIS_TCP_PORT=6379 \ -e LOG_LEVEL=debug \ -p 8080:8080 \ -p 6070:6070 \ envoyproxy/ratelimit:latest

# View logs docker logs -f ratelimit ```

Issue 8: Memory Limits

Configure appropriate memory limits:

bash
docker run -d \
  --name ratelimit \
  -e REDIS_SOCKET_TYPE=tcp \
  -e REDIS_TCP_HOST=redis \
  -e REDIS_TCP_PORT=6379 \
  -e GOMAXPROCS=2 \
  -e GOMEMLIMIT=512MiB \
  --memory=512m \
  --cpus=2 \
  -p 8080:8080 \
  -p 6070:6070 \
  envoyproxy/ratelimit:latest

Verification

Test the rate limit service:

```bash # Health check curl http://localhost:6070/healthcheck

# Test rate limiting with grpcurl grpcurl -plaintext \ -d '{"domain": "my-domain", "descriptors": [{"entries": [{"key": "generic_key", "value": "default"}]}]}' \ localhost:8080 \ pb.lyft.ratelimit.RateLimitService/ShouldRateLimit

# Expected response # { # "overallCode": "OK", # "statuses": [ # { # "code": "OK", # "currentLimit": { # "requestsPerUnit": 100, # "unit": "SECOND" # } # } # ] # } ```

Monitor with Prometheus:

bash
# Metrics endpoint
curl http://localhost:6070/stats/prometheus

Complete Docker Compose Example

```yaml version: '3.8'

services: redis: image: redis:alpine ports: - "6379:6379" command: redis-server --appendonly yes volumes: - redis-data:/data

ratelimit: image: envoyproxy/ratelimit:v1.4.0 depends_on: - redis ports: - "8080:8080" - "6070:6070" environment: - REDIS_SOCKET_TYPE=tcp - REDIS_TCP_HOST=redis - REDIS_TCP_PORT=6379 - RUNTIME_ROOT=/data - RUNTIME_SUBDIRECTORY=ratelimit - LOG_LEVEL=debug volumes: - ./config:/data/ratelimit/config

volumes: redis-data: ```

Create config/config.yaml:

yaml
domain: my-domain
descriptors:
  - key: generic_key
    value: default
    rate_limit:
      unit: second
      requests_per_unit: 100
  - key: remote_address
    rate_limit:
      unit: minute
      requests_per_unit: 1000
  • [Fix docker build cache invalidated unnecessary layers Issue in Docker-Errors](docker-build-cache-invalidated-unnecessary-layers)
  • [Fix Docker Build Cache Invalidation Optimization Issue in Docker](docker-build-cache-invalidation-optimization)
  • [Fix docker build context slow large files Issue in Docker-Errors](docker-build-context-slow-large-files)
  • [Fix docker build multi stage copy from not found Issue in Docker-Errors](docker-build-multi-stage-copy-from-not-found)
  • [Fix docker buildkit export local tar layer missing Issue in Docker-Errors](docker-buildkit-export-local-tar-layer-missing)

<script type="application/ld+json"> { "@context": "https://schema.org", "@type": "TechArticle", "headline": "Fix Envoy Rate Limit Docker Image Issues", "description": "Step-by-step guide to fix envoyproxy/ratelimit Docker image issues. Resolve pull errors, configuration problems, and deploy rate limiting successfully.", "url": "https://www.fixwikihub.com/fix-envoy-ratelimit-docker-image", "publisher": { "@type": "Organization", "name": "FixWikiHub", "url": "https://www.fixwikihub.com" }, "author": { "@type": "Person", "name": "FixWikiHub Editorial Team" }, "datePublished": "2026-04-27T10:04:00.000Z", "dateModified": "2026-04-27T10:04:00.000Z" } </script>