HA setup

Need help? Post your questions here.

HA setup

Unread postby morten » 04 May 2017, 09:32

I'm trying to do HA setup of Madsonic:
The media data storage is on CephFS but could just as well have been on a NFS HA setup.
Madsonic is running as Docker instances (alpinelinux version is awesome).
I would like 2 or 3 Madsonic instances runnning but my main concern is the Madsonic data file integrity. I suspect it will be corrupted if I point multiple instances to the same dir+files and they both start a scan task at the same time.
I'm guessing that the corruption would not happen if only one instance write to the Madsonic data file but then i'd have to point all write tasks like playlist mangling to just one instance in the haproxy doing the load balancing.
Can I use a galera cluster for these media data instead somehow or how would one go about this?

I thought of keeping the data files separated and simply let only one instance do the scan tasks, then copy data from that to the other(s). But I'd like to avoid making haproxy pointing to the "read/write" instance. If I don't my playlists and stuff like that will get overwritten.
morten
 
Posts: 4
Joined: 01 Sep 2014, 10:02
Has thanked: 5 times
Been thanked: 2 times

Re: HA setup

Unread postby a7medo778 » 08 May 2017, 07:16

actually, i have a similar question, i been trying this with ampache with no avail
I am trying to scale the server to accommodate 1000+ users, so how can we scale the installation without sacrificing latency of the api's ?

my current attempt is separating the db into its own node, mount the drive to all front ends, and add a lb
but the latency to download a track has resin to 9+ sec, and indexing to 4+ sec which is too high
a7medo778
 
Posts: 4
Joined: 21 Jul 2015, 11:49
Has thanked: 0 time
Been thanked: 3 times

Re: HA setup

Unread postby Saklasklas222 » 20 May 2017, 13:44

morten wrote:I'm trying to do HA setup of Madsonic:
The media data storage is on CephFS but could just as well have been on a NFS HA setup.
Madsonic is running as Docker instances (alpinelinux version is awesome).
I would like 2 or 3 Madsonic instances runnning but my main concern is the Madsonic data file integrity. I suspect it will be corrupted if I point multiple instances to the same dir+files and they both start a scan task at the same time.
I'm guessing that the corruption would not happen if only one instance write to the Madsonic data file but then i'd have to point all write tasks like playlist mangling to just one instance in the haproxy doing the load balancing.
Can I use a galera cluster for these media data instead somehow or how would one go about this?

I thought of keeping the data files separated and simply let only one instance do the scan tasks, then copy data from that to the other(s). But I'd like to avoid making haproxy pointing to the "read/write" instance. If I don't my playlists and stuff like that will get overwritten.



For HA setup you will need concurrent write access to madsonic DB...which means, this must be build into madsonic code. Then you can setup few instances of Tomcat with nginx or apache as reverse HA proxy, which give you even possibility to have single ssl certificate to all instances if you have users all over internet.

For 1000+ users, you should have rather some seriuos powerfull HW. Musics on dedicated raid with SAS-10000rpm minimum or SSDs. 16 core Xeon CPU at least on 2,4 GHz, 64-128GB ram dedicated only for madsonic. Forget CEPH or docker. Everything should be without containers or network storages(if you have 4-8GB/s fibre channel or 10GB/s network storage link with server, then its ok) and raw as possible if you want performace.
Saklasklas222
 
Posts: 6
Joined: 02 Jun 2013, 16:31
Has thanked: 1 time
Been thanked: 10 times


Return to Support 6.x

Who is online

Users browsing this forum: No registered users and 2 guests

cron