this post was submitted on 07 Jun 2023
7 points (100.0% liked)
Self Hosted - Self-hosting your services.
11440 readers
1 users here now
A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.
Rules
- No harassment
- crossposts from c/Open Source & c/docker & related may be allowed, depending on context
- Video Promoting is allowed if is within the topic.
- No spamming.
- Stay friendly.
- Follow the lemmy.ml instance rules.
- Tag your post. (Read under)
Important
Beginning of January 1st 2024 this rule WILL be enforced. Posts that are not tagged will be warned and if not fixed within 24h then removed!
- Lemmy doesn't have tags yet, so mark it with [Question], [Help], [Project], [Other], [Promoting] or other you may think is appropriate.
Cross-posting
- !everything_git@lemmy.ml is allowed!
- !docker@lemmy.ml is allowed!
- !portainer@lemmy.ml is allowed!
- !fediverse@lemmy.ml is allowed if topic has to do with selfhosting.
- !selfhosted@lemmy.ml is allowed!
If you see a rule-breaker please DM the mods!
founded 3 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
It's been a few years since I used keepalived so my knowledge might be outdated.
You are correct that the VMs should be in different servers. To test around you can set up on the same, but this shouldn't be done in production environments, if you lose the host, you lose the service.
Keepalived will make sure your service is available in an IP. To say, you have two (it can be configured for more than two) servers with (A) 192.168.0.2 and (B) 192.168.0.3 which provide the service you want to provide. With Keepalived you'll configure a common IP for both of them, let's say 192.168.0.4
While working, server A will be available at 192.168.0.2 and 192.168.0.4 while server B will be available at 192.168.0.3. If server A fails keepalived will "move" 192.168.0.4 to server B, so 192.168.0.2 will not be available and server B will be available at 192.168.0.3 and 192.168.0.4.
No matter which server is up / primary, your service will always be available at 192.168.0.4
For the mirroring part, you need to solve it in another step outside from keepalived. For example, MariaDB provides multimaster replication "out of the box" with galera (the recommendation is at least 3 nodes)
For files, depending on your filesystem you should have to rsync, use some shared units, distribute filesystem (Ceph), ...
Thank you for the explanation. I might look into heartbeat, as suggested by @arbiter. I understand now, that keepalived is only working on an IP layer, and not helping me with mirroring my actual VM's. For that I will look into other technologies.