Repository navigation
feat: microservices be gone - #9551
Merged
Merged
Conversation
zackpollard
force-pushed
the
feat/remove-microservices-container
branch
from
May 17, 2024 12:51
661ea35 to
65248e8
Compare
Deploying immich with
|
| Latest commit: |
cc12c61
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://d139b555.immich.pages.dev |
| Branch Preview URL: | https://feat-remove-microservices-co.immich.pages.dev |
Member
|
Can you help write up the motivations behinds this change? So we can include those information in the next release note? Thank you! |
bo0tzz
reviewed
May 17, 2024
zackpollard
force-pushed
the
feat/remove-microservices-container
branch
from
May 17, 2024 13:05
65248e8 to
89da5d6
Compare
zackpollard
force-pushed
the
feat/remove-microservices-container
branch
from
May 17, 2024 13:17
89da5d6 to
7a7ce85
Compare
zackpollard
force-pushed
the
feat/remove-microservices-container
branch
from
May 17, 2024 13:25
7a7ce85 to
264fa1b
Compare
zackpollard
force-pushed
the
feat/remove-microservices-container
branch
from
May 17, 2024 13:30
264fa1b to
cc12c61
Compare
Collaborator
|
Edit: leaving start.sh immich, start.sh microservices works fine. I will move this comment into the docs as an example of a simple split worker setup. To add to release notes: If you prefer to retain the previous structure, with a separate immich_server and immich_microservices container, this can be accomplished as follows: services:
immich-server:
...
+ environment:
+ IMMICH_WORKERS_INCLUDE: 'api'
immich-microservices:
...
+ environment:
+ IMMICH_WORKERS_EXCLUDE: 'api' |
1 of 3 tasks
10 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Caution
Suggested change:
immich-microservicescontainer can be removed from docker composeBreaking change:
start-microservices.shandstart-server.shhas been removed, we haven't used these for a while nowThis PR removes the need for the seperate microservices container, we tested the workers in the 1.105.0 release by moving microservices into a worker process and we've had no issues off the back of that.
apiworkerIMMICH_WORKERS_INCLUDEandIMMICH_WORKERS_EXCLUDEas comma seperated variables to specify which workers you want to runIMMICH_WORKERS_INCLUDEwill override the defaults, only running what you specifyIMMICH_WORKERS_EXCLUDEwill apply against the defaults, orIMMICH_WORKERS_INCLUDEif for whatever reason you wanted to include and then exclude some workers 😆This will simplify the setup process for most users by reducing the amount of containers they are running, the only real downside is that you now can't apply resource constraints against the microservices individually, however you could just go back to having the API and Microservices seperated using the env vars specified above.
Motivation
This is one of many pieces of upcoming work to change the way we handle jobs, microservices was always really a patch for the problem that we couldn't run background tasks within the main server as that would introduce contention for the API itself. Using workers, we can now have these within the same container but separated out into different V8 engines. Moving forwards, we will be looking to split out microservices into more underlying segments such as transcoding, thumbnails, etc, allowing us to have actual "microservices" and people who want to distribute just transcoding for example will be able to.