HTTP 308 Permanent Redirect vs 429 Too Many Requests
HTTP 308 (Permanent Redirect) is a 3xx Redirection response, while 429 (Too Many Requests) is a 4xx Client Error response. 308 indicates that the resource has been permanently moved. Like 301, but guarantees the HTTP method will NOT be changed. In contrast, 429 means that the user has sent too many requests in a given time (rate limiting). The response should include a Retry-After header.
Description
The resource has been permanently moved. Like 301, but guarantees the HTTP method will NOT be changed.
When You See It
For permanent URL changes where POST requests must remain POST.
How to Fix
Update all references to the new URL. The HTTP method is preserved.
Description
The user has sent too many requests in a given time (rate limiting). The response should include a Retry-After header.
When You See It
When hitting API rate limits or making too many requests too quickly.
How to Fix
Check the Retry-After header. Implement exponential backoff. Consider caching responses.
Key Differences
308 is a 3xx Redirection response, while 429 is a 4xx Client Error response.
HTTP 308: The resource has been permanently moved. Like 301, but guarantees the HTTP method will NOT be changed.
HTTP 429: The user has sent too many requests in a given time (rate limiting). The response should include a Retry-After header.
You encounter 308 when for permanent URL changes where POST requests must remain POST.
You encounter 429 when when hitting API rate limits or making too many requests too quickly.
When to Use Which
For 308 (Permanent Redirect): Update all references to the new URL. The HTTP method is preserved. For 429 (Too Many Requests): Check the Retry-After header. Implement exponential backoff. Consider caching responses.