Skip to content

EMQX Rate Limiting Not Working

DodaTech Updated 2026-06-26 1 min read

In this tutorial, you'll learn about EMQX Rate Limiting Not Working. We cover key concepts, practical examples, and best practices.

The Problem

Client connection or message rate limiting does not prevent excessive traffic.

Quick Fix

Wrong

# No rate limiting configured — all traffic allowed
Broker overwhelmed by excessive connections or messages.
# EMQX rate limiting config (emqx.conf)
# zone.default.rate_limit {
#   max_conn_rate = 1000  # Max connections per second
#   messages_per_second = 10000
#   bytes_per_second = 1048576  # 1 MB/s
# }

# Check current rate limit stats
curl -u admin:public http://localhost:18083/api/v5/rate_limit

# Set via API
curl -u admin:public -X PUT http://localhost:18083/api/v5/rate_limit \
  -d '{'max_conn_rate':500,'messages_per_second':5000}'
Rate limits enforced. Clients exceeding limits get connection refused or throttled.

Prevention

Rate limiting protects the broker from DoS and misconfigured clients. Configure per-zone limits (internal vs external). Monitor rate limit hit counters. Set reasonable limits based on expected traffic. Use MQTT 5.0 reason codes for throttle feedback.

DodaTech engineers apply these same patterns across Doda Browser, DodaZIP, and Durga Antivirus Pro for production IoT reliability.

FAQ

### What can be rate limited?

Connection rate (per second), message rate (per second), bytes per second. Separate limits for different zones.

What happens when rate limit is exceeded?

Excess connections are refused. Excess messages may be dropped or delayed depending on configuration.

Does rate limiting affect existing clients?

No. Rate limits apply to new connection attempts and message publishes, not to existing subscribed connections.

Built by the developers of DodaTech

Doda Browser, DodaZIP & Durga Antivirus Pro