
12
FLASH
MEDIA
SERVER
4.5
CONFIGURATION
AND
ADMINISTRATION
Deploying the server
Last updated 11/28/2012
Connect to an edge server
There are two types of edge server connections: explicit and implicit (also called
anonymous
).
An
explicit
edge server prefixes its address to the origin server’s URL in the client
NetConnection.connect()
call.
For example, for applications running on fms.foo.com, instead of clients connecting to an application with a
connection string such as
rtmp://fms.foo.com/app/inst
, clients are directed through the edge, which prefixes its
protocol and hostname to the origin URL, as in the following:
rtmp://fmsedge.foo.com/?rtmp://fms.foo.com/app/inst
An
implicit
edge server does not change or modify the origin server’s URL in the client
NetConnection.connect()
call. The identity (the IP address and port number) of the implicit edge is hidden from the application developer.
Create an explicit connection
❖
Use the following syntax in a client-side
NetConnection.connect()
call to make an explicit connection to an edge
server:
rtmp://
edge/
?rtmp://
origin/app
A question mark (?) separates the edge’s prefix from the main URL. The prefix contains only the protocol,
hostname, and optionally the port number. The prefix must always end with a trailing slash.
Create an implicit connection
1
In the Vhost.xml configuration file, set the
Proxy/Anonymous
element to
true
.
Note:
Restart the server after changing the Vhost.xml file.
2
In the Vhost.xml file, create a routing table in the
RouteTable
element; for more information, see the comments
about
RouteEntry
tags in the Vhost.xml file installed with Flash Media Server.
Element
Description
MaxSize
Specifies the maximum allowed size of the disk cache, in gigabytes. The server
does LRU (least recently used) cleanup of the cache to keep it under the
maximum size. The default value is 32 gigabytes. A value of 0 disables the disk
cache. A value of -1 specifies no maximum.
NumBuckets
Specifies the number of buckets to divide the cache into. The aggregate cache
size is defined by
MaxSize
. Can be any value from 2 to 128; the default value is
8. More buckets mean that a smaller portion of the disk content will be deleted
at any one time, but also that files will need to be moved to new buckets more
often, which results in more disk activity and lower performance.You can define
the number of buckets that contain contents that can be moved with
NumBucketsAtRisk
.
NumBucketsAtRisk
Specifies the number of buckets considered to be "at risk" of deletion. Can be
any value from 0 to
NumBuckets
- 1; the default is
NumBuckets
/2. To avoid
moving files too frequently at the expense of disk performance, only segments
that are in the oldest
NumBucketsAtRisk
buckets will be moved to the newest
bucket when accessed.
A value of 0 means that segments, once pulled from the origin, are never moved
to a newer bucket, effectively turning the cache into a LRU cache. The default
value of
NumBuckets
/2 means that only segments in the "older half" of content
will be moved. Segments in the "newer half" of content are more likely to be
accessed again before they are deleted, thus making it less important to move
them.