Skip to content

Implement mutex for outgoing API calls #340

@builder-247

Description

@builder-247

Currently if multiple requests are made close to each other that require using Mojang or Hypixel APIs, multiple requests are sent. For example when viewing uncached player's stats via Slothpixel UI, 2 requests are sent to Mojang API resolving the username. This behaviour has many disadvantages - rate limits & resources are used unnecessarily.

Ideally when this happens, only one request is sent and the other data consumers wait for the original API response.

The state should be managed with redis for example, allowing multiple web instances to coexist sharing the mutex.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions