Comments (6)
we easily performed 19k requests from the one IP for about a minute (Mojang, if it affects you, we are really sorry. You know, it's all for science!)
It was pretty easy. Only 1k curl threads and about 100% CPU load :D
from chrly.
It is also possible to make new versions of patched Authlib for Minecraft 1.2.5+ that will pass special flag to Ely.by (like noMojang=true
). When the server receives a request with this flag, it does not make a request to Mojang if there is no skin in Ely.by database, but instead informs the client that it has to fetch the skin from Mojang itself, using IP address of the user.
from chrly.
@afdw it may also work as a proxy for Ely.by itself by forwarding the full response from Mojang to Ely. As far as I know all responses are signed, so Ely is able to do the validation.
from chrly.
@turikhay yes, I have thought about it, but there is one key problem: we are going to receive textures, that we don't know. Ely.by codebase uses md5 to identify skins, but even with over 1 500 000 skins in our DB there will be very low hit rate of known textures. I'm not saying that it would not work, but I'd imagine that there will be a lot of skins, that'll never appear on Ely.by. Of course, we can drastically increase Ely.by's skins base, but without a skin recognition system this will only increase the memory costs without a real benefit to the project.
@afdw yeah, it sounds like a good idea. We may decrease the load by reallocating this logic into Authlib (Minecraft 1.7.10+), but for old versions (we are still keeping support for Minecraft 1.2.5) this solution could be the only possible solution, since writing patch for obfuscated classes is not a good idea.
from chrly.
@erickskrauch we can use both solutions at once: 1.7.10+ will request Mojang textures by itself, older versions will ask chrly for Mojang textures, so it will lower Mojang textures RPS
from chrly.
If skin is not exists in database - get skin by mojang api.
If you reached mojang api limit - add this task to queue, and return default Steve skin to client;
You can create longpoll connection, and when we will get skin, we will return skin to client;
from chrly.
Related Issues (20)
- Decrease playernames exchange queue batch size to 10
- Implement worker mode for the textures queue HOT 1
- Add config param to completely disable Mojang textures provider
- Using the skin from SkinsRestorer, if there's no skin on Ely.by HOT 7
- Add health check for the worker mode
- Panics aren't logget to the Sentry
- Print Chrly's version at startup
- Add hostname in the version command output
- Wrong useragent header when remote UUIDs provider used
- Allow to perform playernames to UUIDs requests via custom proxy
- Add a new strategy for batch uuids queue which will perform request as soon as batch size limit will be filled
- Username cache events aren't reported to the statsd
- Potential import collision: import path should be "gopkg.in/h2non/gock.v1", not "github.com/h2non/gock". HOT 2
- Corrupted value in the hash:mojang-username-to-uuid
- Username to UUID hash entry should be invalidated if UUID no more exists
- Avatar by UUID HOT 3
- sa HOT 1
- Change StatsD prefix to "chrly"
- Migrate to mediocregopher/radix Redis library
- Suspicion of a memory leak in the textures cache
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chrly.