Front-end behaves poorly when receiving HTTP 429 (Too Many Requests)

Open
#6,365 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
angular, typescript
Domain
frontend

Research direction

The payload names no source files. Start by finding the existing HttpInterceptor implementations in the Angular app and how they handle error responses, then check where a 429 is currently treated as a hard failure. The expected behavior is a retry that honors Retry-After (falling back to X-Rate-Limit) and eventually completes the page's requests. Done means a test shows a 429 being retried with the delay and the page finishing, and the maintainers have agreed on where the backoff logic belongs.

Written by the indexing model from the issue text.

Description

bug error handling needs analysis performance / caching

Describe the bug

To deal with aggressive bots, we tried adding a request-rate-limiting module (mod-evasive) to our Apache HTTPD. DSpace's behavior was worse and we backed out the change. It appears that DSpace's front end code treats HTTP 429 as a hard error and gives up, resulting in incomplete pages or perpetual marching-dots.

We were using v7.6.

To Reproduce

Steps to reproduce the behavior:

  1. Set up a rate limiting module in HTTPD, such as mod_evasive. Set a fairly low limit.
  2. Go to a page that makes a large number of requests.

Expected behavior

DSpace should back off and retry when it receives a 429 response, using the related headers (Retry-After, X-Rate-Limit) to set the backoff interval.

I note that we already have several HttpInterceptor implementations. This is a suggested method of adding backoff-and-retry, to ensure that all requests are handled and in the same way.

Dominant language
TypeScript
Stars
180
Forks
577
Avg merge
2d 1h
Merged PRs (30d)
100

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from DSpace/dspace-angular

All issues in DSpace/dspace-angular

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.