Loading ...
close

Would you like to discuss your environment with a knowledgable engineer?

Preferred communication *

Thank you. We will be in touch with you shortly

Getting started with Wowza Media Server

This guide will help you get started with aiScaler and Wowza Media Server.

Prerequisites

  • Installed and running copy of Wowza Media Server
  • Installed copy of aiScaler, see “Get aiScaler
  • Rudimentary knowledge of GNU/Linux

Configuration changes on Wowza Media Server

With the default setup of Wowza Media Server no configuration changes are necessary. Note which port your Wowza instance is listening on (usually 1935) and it’s IP address.

Configuring aiScaler

Create the file /usr/local/aicache/wowza.cfg using the template below.

You will have to change the hostname variable to your external hostname, and origin to match your Wowza instance IP address. For further details about configuring and tuning, see the aiScaler Admin Guide.


###########################################################################
# Example Aicache Configuration file for Wowza Media Server
###########################################################################
server
listen http 0.0.0.0 80
if_name eth0 # MUST POINT TO VALID Interface name that you used to obtain the license

username aicache # Will run as this user, must be a valid user
groupname aicache # Will run as this group, must be a valid group

logdirectory /var/log/aicache # Log directory: access, error, stats, snmp.stat go there
drop_user_agent # Do not log user-agent information
log_healthcheck # Will log health check requests
logstats # Log global statistics

maxkeepalivereq 20 # Max # of keep-alive requests per client keep-alive connection
maxkeepalivetime 10 # Max lifespan of client keep-alive connection, seconds
maxclientidletime 4 # Max idle time of client keep-alive connection, seconds
maxosidletime 4 # Origin Server connection max idle time

snmp_stat_interval 4 # SNMP stats refresh interval, seconds

max_os_ka_conn 2 # Max number of origin server keep-alive connections, per origin server
max_os_ka_req 20 # Max number of origin server requests per os keep-alive connection
###########################################################################
# Website Section. You must define your hostname(s) and matching origin server(s)
###########################################################################
website

hostname stream.example.com

min_gzip_size 4000 # Will compress compressible responses over 4000 bytes in size
fallback # Will fall back to prev cached response if new one can not be obtained
logstats # Will log basic website stats to a dedicated stats log file

httpheader Connection keep-alive
httpheader Accept */*
httpheader Accept-Encoding gzip

# Health checking example, this will request /test.html every 5 seconds, match
# to “HTTP”, timeout 4 seconds

#healthcheck /test.html HTTP 5 4

# Required to reload aicache configuration without service interrupts
reload_watch_file /usr/local/aicache/reload
reload_success_file /var/run/aicache_reload_success
reload_fail_file /var/run/aicache_reload_fail

########################################################################
# Patterns: this is what sets up Time-to-Live (caching rules)
########################################################################
pattern .bootstrap simple 2
#pattern /$ regexp 1m # cache for 1 minute: “/”, “/news/” etc

########################################################################
# Origin servers.
########################################################################
origin wowza-instance.example.com 1935

Then you should be ready to start aiScaler:

export LD_LIBRARY_PATH=/usr/local/lib
ulimit -c 4000000000
ulimit -n 64000
/usr/local/aicache/aicache -f /usr/local/aicache/ams.cfg -l /usr/local/aicache/licence.key $@

US 1 (408) 744-6078   EU +44 20 7993 4587