Media Flow Controller CLI Commands : namespace

namespace
A namespace is a named collection of parameters that set delivery policies in a granular manner; you can configure up to 64 namespaces. To set global delivery policies, see delivery for CLI details. See “Namespace Options” on page 79 for task details and implementation particulars.
Tip! At a minimum, a namespace configuration requires a name, domain, origin-server, match setting, and status activation. Other settings can be left at defaults. Example:
namespace example
domain www.example.com
origin-server http sv05
match uri /vod
status active
Note! What you configure for origin-server also sets a proxy mode and, in some cases, certain defaults. See “Using namespace for Proxy Configurations” on page 86 for details.
Note! In Release 2.0.2 Multiple HTTP or NFS origin servers can be configured with the server-map option. See server-map for CLI details; “Using namespace origin-server <protocol> server-map” on page 83 for task details.
namespace <name>
cache-inherit <namespace_UID>
client-request cache-control max-age <number> action serve-from-origin
cluster-hash {complete-url | base-url}
delivery protocol
http
client-request {cookie | query-string} action {cache [exclude-query-string] | no-cache}
client-response header <name> [<value>] action {add | delete}
origin-fetch
byte-range {ignore | preserve}
cache-age {content-type<string><secs> | content-type-any <secs>}
cache-age-default <seconds>
cache-directive no-cache {follow | override}
content-store media [cache-age-threshold<secs>] [object-size<bytes>]
date-header modify {deny | permit}
origin-request
cache-revalidation {deny | permit [use-date-header]}
connect timeout <seconds> retry-delay <seconds>
header <name> [<value>] action add ...
host-header inherit incoming-req {deny | permit}
read interval-timeout <seconds> retry-delay <seconds>
x-forwarded-for {disable | enable}
rtsp
origin-fetch
cache-age-default <seconds>
cache-directive no-cache {follow | override}
content-store media [cache-age-threshold<secs>] [object-size<bytes>]
domain {any | regex <regex> | <FQDN>}
live-pub-point <name>
caching {enable | disable}
receive-mode on-demand
status {active | inactive}
match
header {regex <regex> | <name> {any | <value>}} [precedence <number>]
query-string {regex <regex> | <name> {any | <value>}} [precedence <number>]
uri {regex <regex> | <uri-prefix>} [precedence <number>]
virtual-host <IP_address> [<port>] [precedence <number>]
object {delete | list | revalidate all} [all | <URI> | <pattern>] [<domain>] [<port>]
origin-server
http {absolute-url | follow {{dest-ip [use-client-ip] | header<header>} [use-client-ip] | dest-ip [use-client-ip]} | server-map <map_name> | <FQDN/path> [<port>]}
nfs {server-map <name> | <FQDN:export_path> [<port>]}
rtsp {follow dest-ip [use-client-ip] | <FQDN> [<port#>][rtp-udp | rtp?rtsp]}]
pre-stage
ftp user <username> password <password>}
password {RADIUS | TACACS | <password>}
proxy-mode transparent on-ip <Media Flow Controller_interface_IP_address>
status {active | inactive}
virtual-player <name>
Define a namespace with a name; use cache-inherit to move another namespace’s cache to this one. Also define a domain, match criteria, and origin-server, then use status to activate the namespace; use match to refine the request path. Example:
namespace example cache-inherit b315614e
domain www.example.com
match uri /vod
origin-server http sv05
status active
Use no namespace <name> to delete; in prefix mode, use namespace <name> no... or namespace <name> <uri-prefix> no... to make changes to configurations. Notes:
cache-inherit—Add the specified namespace’s cache to this one; see “Using namespace cache-inherit” on page 79, for details.
client-request cache-control max-age <number> action serve-from-origin—Set a Max-Age value for the incoming request Cache-Control header. Default is 0 (zero) which invalidates the incoming Max-Age value causing a data fetch from origin.
cluster-hash—Choose to calculate the consistent hash using the complete-url of the incoming request or the base-url. Examples: complete-url: /a/b/c/myobject.html -> MD5 hash (/a/b/c//myobject.html); base-url: /a/b/c/myobject.html -> MD5 hash (/a/b/c/).
delivery protocol—Set delivery protocol options; two delivery protocols and options may be configured. Entering the delivery protocol puts you into namespace delivery protocol configure mode; use exit when finished.
http—Configure options for HTTP delivery:
client-request—Manipulate incoming client requests containing either:
-
cookie—Set an action for objects with a cookie (cookies are typically dynamic and often not appropriate for caching); either cache or no-cache (default).
-
query-string—Set an action for objects with a query-string (such objects are typically dynamic and often not appropriate for caching); either cache (and, optionally, exclude-query-string itself from the cache) or no-cache (default).
client-response—Manipulate headers in incoming client responses. Up to sixteen header actions can be set; either add or delete. Note! If you enter only a header <name>, the only action allowed is delete; if you enter a header <name> and <value>, the only action allowed is add.
origin-fetch—Set policies for content fetched from origin; see “(namespace) delivery protocol {http | rtsp} origin-fetch," below, for CLI details.
origin-request—Set policies for content requested from origin; see “(namespace) delivery protocol http origin-request," below, for CLI details.
rtsp— Configure options for RTSP delivery:
origin-fetch—Set policies for content fetched from origin; see “(namespace) delivery protocol {http | rtsp} origin-fetch," below, for CLI details.
domain—The defined FQDN (fully qualified domain name) or REGEX (regular expression) is matched with the incoming HOST header. If there is a match, the request is refined with match value (next option). See “Using namespace domain <FQDN:Port>” on page 80 and/or “Using namespace domain regex” on page 80 for task details.
any (default)—Allow all domains to use this namespace.
regex— Set the domain for this namespace with a regular expression. Note! Enclose all regex entries in single quotes; for example, a regex for www.example.com plus example.com could be this: ‘^.*\example\.com’.
FQDN—Enter a Fully Qualified Domain Name (FQDN). Important! The domain you enter should match whatever you have configured as HOST header; you may append a port number as well, if needed (and used in HOST header).
live-pub-point—Add a live stream publishing service.
caching—Either enable or disable (default) caching for this live-pub-point.
receive-mode—Set a method for receiving live streaming:
on-demand—Contact the origin/publishing server when a request from the client is received.
status—Make active or inactive (default) the live-pub-point.
match—Refine the path of incoming requests (enclose all regex entries in single quotes). All match options may utilize the optional precedence argument to break ties when namespaces are defined with the same match criteria; the lower the precedence number, the higher the preference for that namespace; 0 (zero) is default and highest. See “Using namespace match <criteria> precedence” on page 81, for details.
header—A header <name> and <value> or use any for any value of that header; can also be a regex. Optionally, set a precedence (see match explanation above).
query-string—A defined query param <name> and <value> or use any for any value of that query param; can also be a regex. Optionally, set a precedence (see match explanation above).
uri—A <uri-prefix>; can also be a regex. See “uri-prefix” on page 31 for uri-prefix definition and usage. Optionally, set a precedence (see match explanation above).
virtual-host—The IP address must be a /32 address; it can take a special value of 0.0.0.0, which means any IP address. The <port number> specification is optional. To map requests by TCP port number only, set the IP address to 0.0.0.0 and configure the port number. If you set the domain to any, configure virtual-host IP to 0.0.0.0, then requests can be assigned to a namespace based solely on the port number on which the request comes in to Media Flow Controller. Optionally, set a precedence (see match explanation above).
objectEXEC command. Either delete, or view (list), the contents of a namespace specified with either a uri (can include a file name), a <pattern>, or all to delete or list the contents of all configured namespaces. Use the domain and port arguments for mid-tier or virtual namespaces. Use revalidate all to validate the timestamp of each object in cache, even if not expired. See “(namespace) object list | delete | revalidate," below, for CLI details.
origin-server—Specify how Media Flow Controller determines and accesses origin for cache misses; see “(namespace) origin-server," below, for CLI details.
pre-stage—Set authentication options for pre-staging content.
ftp user <username> password <password>—Set a password or authentication credentials for the default, auto-created namespace FTP user, <namespace>_ftpuser; for FTP pre-staging content to Media Flow Controller. Only this user can do FTP pre-staging for that namespace. When opening the FTP session, log in as the auto-configured user. (<namespace>_ftpuser); in this way, every FTP session transfers content only for a single namespace. Please refer to radius-server and tacacs-server for setting authentication schemes.
password—Set a password, or use a configured RADIUS or TACACS+ password.
proxy-mode transparent on-ip—Set this namespace to be a Transparent Proxy using the IP address of your Media Flow Controller that you enter. See “Using namespace for Proxy Configurations” on page 86 for more information.
status—Make active or inactive the namespace; you must deactivate the namespace to make large changes, like the match value. Important! A newly-created namespace is in inactive by default; you must explicitly activate it.
virtual-player <name>—Associate a defined virtual player with a namespace; in this way, that namespace uses the specified virtual-player settings rather than the default Media Flow Controller settings configured with the network connection commands. Use no virtual-player to remove. See virtual-player for CLI details.
show namespace {list | <namespace_name>}
Display the list of namespaces in the system, or details of a given namespace. When used with <namespace_name>, the output relevant to the namespace, such as the Active status, Precedence, URI Prefix, Delivery Protocol, Domain, Origin Server and options, Virtual Player (if any), Origin Fetch configuration, and Pre-stage FTP configuration, is given.
Note! Configuration changes, including a namespace deletion, may not be updated for up to 30 seconds. This is due to a deferred update scheme that requires an HTTP request. An internal probe ensures that such a request occurs at least every 30 seconds.

Report an Error
Media Flow Controller Administrator's Guide and CLI Command Reference
Copyright © 2010 Juniper Networks, Inc.