-
-
Notifications
You must be signed in to change notification settings - Fork 27
Description
Description of issue
Recently users have had issues with username lookups. This is due to the severe rate-limiting of the Mojang endpoint at 600 requests/min.
Pre 39753d5 uses https://api.ashcon.app/mojang/v1/user/${name}
Post 39753d5 uses https://playerdb.co/api/player/minecraft/${name}
In my use-case looking up multiple players using the graphql endpoint I found that pre 39753d5 had a better success rate than post 39753d5, however overall the response has been faster and more consistent for most user's post 39753d5.
Proposed solutions
1. Revert 39753d5.
This would be beneficial to my specific use case however would be worse for the average user. Not recommended.
2. Use api.ashcon.app for graphql & multiple player lookups and playerdb.co for single player lookups.
It would still be possible for single-player lookups to be affected by rate limits. I have found that this still happens around peak times, although the failure rate is much lower compared to multiple-player requests.
3. Add support for multiple endpoints
For each request, randomly select a lookup service. This could be weighted to have a preference towards a specific endpoint.
Example:
- 70% chance for
playerdb.co - 25% chance for
api.ashcon.app - 5% chance for
api.mojang.com
4. Use Mojang API directly for requesting bulk players
It supports up to 10 players at once. https://wiki.vg/Mojang_API#Playernames_-.3E_UUIDs