Old 1st September 2020, 16:20   #1
charliebritton
Junior Member
 
Join Date: Jul 2020
Posts: 2
Running multiple servers as a CDN

I am having issues implementing the SHOUTcast DNAS server CDN features at the
moment. I've got a 'master' server which has all of the streams connected to it,
with their correct authhashes. This sever plays all of the streams just fine.

**I've changed all the passwords and stream IDs**

Servers in Cluster:
- master.streaming.example.com
- relay0.streaming.example.com
- relay1.streaming.example.com

Here's an excerpt from the config on the 'master' server:
code:

# General Settings
adminpassword=XXXXXXXX
password=XXXXXXXX

logfile=/var/log/shoutcast/sc_serv.log
banfile=/etc/shoutcast/sc_serv.ban
ripfile=/etc/shoutcast/sc_serv.rip

maxuser=500
songhistory=100
cpucount=1

allowrelay=1
allowpublicrelay=1
cdn=always

# Stream Specific Settings

# Radio 7654
streamid_7654=7654
streampassword_7654=0874721ab532219ddfe3f1d2a2ebff8ce5501e9633e832e79e89dee24088ba9f
streamauthhash_7654=da0785baa5c7b55e

# 345 Hits Radio
streamid_345=345
streampassword_345=af10e88a9dbd3948b90f359e645afb81da67c8eeb335d40d7725185b124504e8
streamauthhash_345=04d9ce556b3cda5b



And the ripfile for the 'master' server:
code:

relay0.streaming.example.com
relay1.streaming.example.com
```

And a config from relayX:
```
# General Settings
adminpassword=XXXXXXXX
password=XXXXXXXX

cdn=always
cdnslave=1

allowpublicrelay=1
publicserver=always

# Stream Specific Settings
streamrelayurl_7654=http://master.streaming.example.com:8000/stream/7654/
streamrelayurl_345=http://master.streaming.example.com:8000/stream/345/



As far as I'm aware, the master server should be able to accept connections from
both the relays through the ripfile, which should then be able to inherit the
authhashes from the master. However, when I've deployed these servers, **they can
connect to the master server just fine and stream the radios they've been configured
to relay, but they aren't inheriting the authhash.** That's the first problem.

The second one is more to do with loadbalancing these servers. I *could* use a DNS
round robin to have it try each server and configure it so anyone connecting through
streaming.example.com would be sent to either the master, relay0 or relay1 but then
I'm not entirely sure that's the smartest way to do it. The second idea I had for
this is to have streaming.example.com run an apache server that would somehow redirect
traffic to one of the servers maybe though a loadbalancer or some smart redirect.

Obviously, if there's a way to route all traffic to the master server and have that
send a 302 redirect to the relay with the least load that would be amazing!

And finally, is there a way that I wouldn't have to add the stream specific settings
part into the relay config and just have it inherit the streams on the master?

I know it's a long question but I've tried to be as detailed as possible in how
my infrastructure is configured and to hopefully help some others in the future.

Many thanks,

Charlie
charliebritton is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Shoutcast > Shoutcast Technical Support

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump