Skip to content

Implement mutex for outgoing API calls #340

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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