Difference between revisions of "Building Helix Server Cluster using LVS"
From LVSKB
(→VS/NAT) |
(→Introduction) |
||
(6 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
== Introduction == | == Introduction == | ||
− | + | [http://en.wikipedia.org/wiki/Helix_%28project%29 Helix] is an open source project started by Real Networks to provide audio and media service. | |
+ | |||
+ | A single Helix server always has its limitation in performance. Server cluster can be used to scale up the performance of the whole Helix media system and provide redundancy. | ||
+ | |||
+ | Helix streaming service uses the following protocols: | ||
* PNM (TCP on port 7070, UDP from server -> player on ports 6970-7170) | * PNM (TCP on port 7070, UDP from server -> player on ports 6970-7170) | ||
Line 7: | Line 11: | ||
* PNM was our original, but now mostly legacy, protocol used in our versions 1 through 5. | * PNM was our original, but now mostly legacy, protocol used in our versions 1 through 5. | ||
* There's also a HTTP/TCP-only fallback mode which is (usually) on port 8080. | * There's also a HTTP/TCP-only fallback mode which is (usually) on port 8080. | ||
+ | |||
+ | When a media player client is accessing those services, those service might have some affinity. A good [[load balancer]] need to combine those service together as a single load balancing service. | ||
== Architecture == | == Architecture == | ||
Line 15: | Line 21: | ||
{| | {| | ||
|- | |- | ||
− | || VIP/ | + | || VIP/EXT IP || 192.168.9.244 |
+ | |- | ||
+ | || GATEWAY IP || 192.168.0.1 | ||
|- | |- | ||
||RS1 || 192.168.0.150 | ||RS1 || 192.168.0.150 | ||
Line 24: | Line 32: | ||
Run the follwing script on LB Server: | Run the follwing script on LB Server: | ||
− | ipvsadm -A -t 192.168.9.244:554 -s rr | + | ipvsadm -A -t 192.168.9.244:554 -s rr |
− | ipvsadm -a -t 192.168.9.244:554 -r 192.168.0.150 -m | + | ipvsadm -a -t 192.168.9.244:554 -r 192.168.0.150 -m |
− | ipvsadm -a -t 192.168.9.244:554 -r 192.168.0.160 -m | + | ipvsadm -a -t 192.168.9.244:554 -r 192.168.0.160 -m |
Run | Run | ||
realplay rtsp://192.168.9.244/test.rm | realplay rtsp://192.168.9.244/test.rm | ||
+ | |||
+ | for a test. | ||
+ | |||
+ | |||
+ | === VS/DR === | ||
+ | {| | ||
+ | |- | ||
+ | || VIP/eth0:0 || 192.168.9.200/24 | ||
+ | |- | ||
+ | || LB/eth0 || 192.168.9.244 | ||
+ | |- | ||
+ | ||RS1 || 192.168.9.150 with lo0:0 192.168.9.244/32 noarp | ||
+ | |- | ||
+ | ||RS2 || 192.168.9.160 with lo0:0 192.168.9.244/32 noarp | ||
+ | |} | ||
+ | |||
+ | Run the follwing script on LB Server: | ||
+ | ipvsadm -C | ||
+ | ipvsadm -A -t 192.168.9.200:554 -s rr | ||
+ | ipvsadm -a -t 192.168.9.200:554 -r 192.168.9.150 -g | ||
+ | ipvsadm -a -t 192.168.9.200:554 -r 192.168.9.160 -g | ||
+ | |||
+ | Run | ||
+ | realplay rtsp://192.168.9.200/test.rm | ||
for a test. | for a test. | ||
Line 38: | Line 70: | ||
== References == | == References == | ||
+ | * [http://shop.heureka.com/upload/real_seminars_050518_scale.pdf How Do You Scale Your Digital Media Deployment] | ||
* http://archive.linuxvirtualserver.org/html/lvs-users/2001-06/msg00097.html | * http://archive.linuxvirtualserver.org/html/lvs-users/2001-06/msg00097.html | ||
Latest revision as of 08:16, 8 April 2007
Contents
Introduction
Helix is an open source project started by Real Networks to provide audio and media service.
A single Helix server always has its limitation in performance. Server cluster can be used to scale up the performance of the whole Helix media system and provide redundancy.
Helix streaming service uses the following protocols:
- PNM (TCP on port 7070, UDP from server -> player on ports 6970-7170)
- RTSP (TCP on port 554, similar UDP as above, but often on multiple ports)
- PNM was our original, but now mostly legacy, protocol used in our versions 1 through 5.
- There's also a HTTP/TCP-only fallback mode which is (usually) on port 8080.
When a media player client is accessing those services, those service might have some affinity. A good load balancer need to combine those service together as a single load balancing service.
Architecture
Configuration Example
VS/NAT
VIP/EXT IP | 192.168.9.244 |
GATEWAY IP | 192.168.0.1 |
RS1 | 192.168.0.150 |
RS2 | 192.168.0.160 |
Run the follwing script on LB Server:
ipvsadm -A -t 192.168.9.244:554 -s rr ipvsadm -a -t 192.168.9.244:554 -r 192.168.0.150 -m ipvsadm -a -t 192.168.9.244:554 -r 192.168.0.160 -m
Run
realplay rtsp://192.168.9.244/test.rm
for a test.
VS/DR
VIP/eth0:0 | 192.168.9.200/24 |
LB/eth0 | 192.168.9.244 |
RS1 | 192.168.9.150 with lo0:0 192.168.9.244/32 noarp |
RS2 | 192.168.9.160 with lo0:0 192.168.9.244/32 noarp |
Run the follwing script on LB Server:
ipvsadm -C ipvsadm -A -t 192.168.9.200:554 -s rr ipvsadm -a -t 192.168.9.200:554 -r 192.168.9.150 -g ipvsadm -a -t 192.168.9.200:554 -r 192.168.9.160 -g
Run
realplay rtsp://192.168.9.200/test.rm
for a test.
Conclusion
References
- How Do You Scale Your Digital Media Deployment
- http://archive.linuxvirtualserver.org/html/lvs-users/2001-06/msg00097.html
"Building Helix Server Cluster using LVS" is an LVS Example related stub. You can help LVSKB by expanding it |