diff --git a/CHANGELOG.md b/CHANGELOG.md index 6867097..51e18fc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] - xxxx-xx-xx ### Added -- Added remote mode for Mojang's textures queue. +- Remote mode for Mojang's textures queue with a new configuration params: `MOJANG_TEXTURES_UUIDS_PROVIDER_DRIVER` and + `MOJANG_TEXTURES_UUIDS_PROVIDER_URL`. + + For example, to send requests directly to [Mojang's APIs](https://wiki.vg/Mojang_API#Username_-.3E_UUID_at_time), + set the next configuration: + - `MOJANG_TEXTURES_UUIDS_PROVIDER_DRIVER=remote` + - `MOJANG_TEXTURES_UUIDS_PROVIDER_URL=https://api.mojang.com/users/profiles/minecraft/` +- Implemented worker mode. The app starts with the only one API endpoint: `/api/worker/mojang-uuid/{username}`, + which is compatible with [Mojang's endpoint](https://wiki.vg/Mojang_API#Username_-.3E_UUID_at_time) to exchange + username to its UUID. It can be used with some load balancing software to increase throughput of Mojang's textures + proxy by splitting the load across multiple servers with its own IPs. + - New StatsD metrics: - Counters: - `ely.skinsystem.{hostname}.app.mojang_textures.usernames.textures_hit` @@ -14,10 +25,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed - `ely.skinsystem.{hostname}.app.mojang_textures.usernames.iteration_size` and - `ely.skinsystem.{hostname}.app.mojang_textures.usernames.queue_size` are now updated even if the queue is empty. + `ely.skinsystem.{hostname}.app.mojang_textures.usernames.queue_size` are now updates even if the queue is empty. ### Changed -- Event `ely.skinsystem.{hostname}.app.mojang_textures.already_in_queue` has been renamed into `ely.skinsystem.{hostname}.app.mojang_textures.already_scheduled`. +- **BREAKING**: `QUEUE_LOOP_DELAY` param is now sets as a Go duration, not milliseconds. + For example, default value is now `2s500ms`. +- **BREAKING**: Event `ely.skinsystem.{hostname}.app.mojang_textures.already_in_queue` has been renamed into + `ely.skinsystem.{hostname}.app.mojang_textures.already_scheduled`. ## [4.3.0] - 2019-11-08 ### Added diff --git a/README.md b/README.md index 60b2b88..98a14a2 100644 --- a/README.md +++ b/README.md @@ -57,12 +57,80 @@ docker-compose up -d app **Variables to adjust:** -| ENV | Description | Example | -|--------------------|-------------------------------------------------------------------------------------------------|-------------------------------------------| -| STORAGE_REDIS_POOL | By default, Chrly creates pool with 10 connection, but you may want to increase it | `20` | -| STATSD_ADDR | StatsD can be used to collect metrics | `localhost:8125` | -| SENTRY_DSN | Sentry can be used to collect app errors | `https://public:private@your.sentry.io/1` | -| QUEUE_LOOP_DELAY | Parameter is sets the delay before each iteration of the Mojang's textures queue (milliseconds) | `3200` | +
ENV | +Description | +Example | +
---|---|---|
STORAGE_REDIS_HOST | +
+ By default, Chrly tries to connect to the redis host
+ (by service name in docker-compose configuration).
+ |
+ localhost |
+
STORAGE_REDIS_PORT | ++ Specifies the Redis connection port. + | +6379 |
+
STORAGE_REDIS_POOL | +By default, Chrly creates pool with 10 connection, but you may want to increase it | +20 |
+
STATSD_ADDR | +StatsD can be used to collect metrics | +localhost:8125 |
+
SENTRY_DSN | +Sentry can be used to collect app errors | +https://public:private@your.sentry.io/1 |
+
QUEUE_LOOP_DELAY | ++ Parameter is sets the delay before each iteration of the Mojang's textures queue + (Go's duration) + | +3s200ms |
+
QUEUE_BATCH_SIZE | +
+ Sets the count of usernames, which will be sent to the
+ Mojang's API to exchange them to their UUIDs.
+ The current limit is 10 , but it may change in the future, so you may want to adjust it.
+ |
+ 10 |
+
MOJANG_TEXTURES_UUIDS_PROVIDER_DRIVER | +
+ Specifies the preferred provider of the Mojang's UUIDs. Takes remote value.
+ In any other case, the local queue will be used.
+ |
+ remote |
+
MOJANG_TEXTURES_UUIDS_PROVIDER_URL | +
+ When the UUIDs driver set to remote , sets the remote URL.
+ The trailing slash won't cause any problems.
+ |
+ http://remote-provider.com/api/worker/mojang-uuid |
+