Comments (19)
Hey @bo0tzz @onedr0p @joryirving @MegaShinySnivy , created a helm chart MR in #560. Take a look.
charts/README.md
contains an example values file to deploy with no other resources. Let me know if you have any questions or feedback. Microservice helm charts can be a little challenging. First pass focused on reducing configuration complexity.
from kyoo.
For the immich helm chart, I used the common-library chart from bjw-s as a base, which helped get a chart together much quicker.
from kyoo.
@zoriya , can this ticket be updated like we talked about in #560 (comment). Some of the related check boxes here were not relevant. #450 did not need to happen for a helm chart to occur. Kubernetes relies upon Ingress/Gateway standards for configuring reverse proxies of all kinds.
As for the other conversation, can that please move into #477, That literally has nothing to do with the helm chart. Personally I think the issue should be closed as they are asking for Kyoo cluster/mesh where one is in their home and the other is in the cloud somewhere. I overwhelmingly disagree with any approach of using infrastructure to solve this problem. You are relying upon infrastructure to solve issues that are bespoke problems.
from kyoo.
Rather than 1 container doing all the transcoding, you could create 1 pod per transcode stream.
That may require a Kubernetes operator or for the application to at least be Kubernetes aware and have proper Kubernetes RBAC setup for the app to create transcoding pods. It would be neat but might be outside the scope of this issue.
from kyoo.
Feel free to reach out if you need any help, I joined your discord 😄
from kyoo.
Something to consider with the helm chart, would be to be able to spawn transcoders as needed. Rather than 1 container doing all the transcoding, you could create 1 pod per transcode stream.
from kyoo.
I'm not particularly familiar with HorizontalPodAutoscaler
s or KEDA, but maybe if one of those was involved scaling could be done without many changes on Kyoo's side?
from kyoo.
I do want to support transcoder scaling and distributed transcodes. Not sure what is needed for that, I just finished reading the getting started of k8s x)
from kyoo.
Rather than 1 container doing all the transcoding, you could create 1 pod per transcode stream.
That may require a Kubernetes operator or for the application to at least be Kubernetes aware and have proper Kubernetes RBAC setup for the app to create transcoding pods. It would be neat but might be outside the scope of this issue.
For HPA an operator is not required. You can setup auto-scaling based on CPU/RAM metrics, which come out of the box with any modern k8s distribution. Auto-scaling on custom metrics (e.g. a combination of transcoding jobs + queue + <another_random_metric>) is possible, but requires something like prometheus. Now, people running kubernetes at home (like myself) usually are familiar with this stack (I do this for a living) but I believe it's an overkill. Most home deployments will have a dedicated RPi4/5 or something another low end box running Kyoto (or any media server) with additional storage attached.
An operator handles way more than autoscaling (e.g. automated DB backups/restore, version upgrades, storage expansion, maintenance tasks, etc.)
from kyoo.
I'd be willing to help test this chart and by extension Kyoo itself--I have enough users to put it through home/small event use (10ish users)
from kyoo.
Thanks! I started working on it on the feat/helm
branch, but I was focused on something else, so It kinda stalled. An app-template based helm charts has been made by the folks in the home-assistant discord server.
I probably won't continue working on the helm chart soon, If someone wants to upstream the helm chart I'm open for it!
from kyoo.
It would be nice if as part of this one could also do something federation-esque(as suggested in #477) and split the actual library storage and transcoding across instances, but have it be shown as a single library and still have just a single frontend.
All that would really be needed is to be able to have different folders that the transcoder and scanner read from, and have dispatch to the right transcoder that actually has access.
from kyoo.
I don't really see how #477 relates to the helm chart
from kyoo.
Route users to the same transcoder instance if they are requesting an video already being handled by an instance
From this it's a relatively small step architecturally towards "Route user towards the transcoder instance that has the file to be streamed located close to it" essentially. It isn't too big a deal to have a slow distributed mount(think minio, s3fs, gluster, etc., even something simple like sshfs+mergerfs) for scanning, but it is bad for transcoding/streaming purposes.
from kyoo.
Route users to the same transcoder instance if they are requesting an video already being handled by an instance
This would be needed to support replicate for the transcoder since using a redis for segment storage would probably introduce too much complexity & latency to make replicate worth it.
I have absolutely no idea how to do it tho
from kyoo.
Route users to the same transcoder instance if they are requesting an video already being handled by an instance
This would be needed to support replicate for the transcoder since using a redis for segment storage would probably introduce too much complexity & latency to make replicate worth it.
I have absolutely no idea how to do it tho
I mean if this is all you need it's just a loadbalancer problem. HAProxy can do it using the balance uri config option probably. Couldn't find an equivalent strategy for traefik.
One of those(or some other load balancer, can't say I have a great overview of the options) could probably also be made to do "Route user towards the transcoder instance that has the file to be streamed located close to it" somehow, though I'd have to think how that might work.
EDIT:
If tell your clients which server they're talking to and force them to provide that as a URL param you can use balance url_param I suppose and that would solve everything.
Also for Traefik what might work is to mirror all requests and just ignore them if this replica isn't responsible. Would probably require some negotiation between replicas as to which one should respond for new transcodes, but some intelligence there might be desirable anyway.
from kyoo.
balence url is exactly what i was hoping to have. Thanks!
negotiation between replicas would indeed be good, it would be used to know when a user switch to another instance so the previous one can cleanup.
from kyoo.
I was moreso thinking for negotiating which instance should take care of a request in the first place. Load might not map to number of simultaneous streams very well, for a small number of streams per instance. Think for instance a transcode to 4K HEVC vs 480p H264. Also would have the advantage of not pulling in a whole second proxy just for this.
from kyoo.
I created an issue for each item, i'll keep this list here for future reference. This isssue will be closed (and readme updated) when we merge the helm charts!
from kyoo.
Related Issues (20)
- Redirect Loop during Setup HOT 6
- Switch to fmp4 segments to support a broader range of codecs
- Roku support
- Support using Postgres database without public schema HOT 1
- Support RabbitMQ Vhosts
- Support "unmatched" subfolders in library HOT 3
- Transcoder: Handle Base64 path with slash HOT 2
- Add "Choose subtitle" button HOT 3
- Add an option to disable the regsiter button
- better (any) error handling
- Completely creshes when trying to stream HDR content HOT 1
- Support Sonarr's Kodi(XBMC) metadata HOT 1
- Samsung Tizen Client
- Distribute the scanner cache between instances (probably by using redis) HOT 1
- Add a route to the transcoder to inform the user has left (stop user's transcode when switching instance) (or use rabbimq to tell others instances that a user switched instance)
- Route users to the same transcoder instance if they are requesting an video already being handled by an instance
- Automatic subtitle selection improvements HOT 2
- v5 plans HOT 6
- Use libVLC or libMPV for the android client
- Preview videos by using thumbnails
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 kyoo.