Wowza encoder GraphQL API resource limitations

Learn about working with resource limitations in the Wowza™ encoder GraphQL API for Wowza ClearCaster™ appliances.

Notes:
  • The Wowza encoder GraphQL API is in a private preview.
  • Wowza ClearCaster version 2.0.0.07 or later is required.

About Wowza encoder GraphQL API resource limitations


Operations performed with the Wowza encoder GraphQL API are subject to limitations that protect shared server resources. This article provides an overview of current methods for calculating and tracking API rate limits, however, limitations and the formula used to calculate them are subject to change without notice.

The Wowza encoder GraphQL API uses rate limits set per namespace for operations that use API keys. The rate limit is an amount of operation cost that you can perform in one minute of UTC time.

Note: Operations originating from the Wowza ClearCaster Manager don't count towards the limit set for a namespace.

Rate limit calculations


Each operation has a calculated cost according to these factors:

  • Number of fields - The more data you request, the higher the cost.
  • Type of operation - Mutations have a higher cost than queries or subscriptions.
  • Depth - The more levels deep the query is, the higher the cost. We recommend operations no more than four levels deep.

Here are some examples of operations and their calculated costs:

query allEncoders {
  allEncoders {
    id
    name
    serial
    encoderStatus {
      status
    }
  }
}

Calculated cost for allEncoders example query: 15

mutation createBroadcast {
  createBroadcast(namespaceId: "your namespace ID", 
    input: {
      name: "My New Event", 
      status: IDLE}) 
  {
    id
    name
    status
    input {
      inputType
    }
  }
}

Calculated cost for createBroadcast example mutation: 17

query allBroadcasts {
  allBroadcasts {
    id
    status
    outputs {
      id
      streamTargets {
        id
        streamName
        url
        streamTargetEncoderIndex
        protocol
        username
      }
    }
    broadcastEncoders {
      id
      encoder {
        id
        name
      }
    }
    transcodingConfiguration {
      id
      scaling {
        id
        flags
      }
      postProcessing {
        sortBufferEnable
        sortBufferSize
        id
      }
    }
  }
}

Calculated cost for allBroadcasts example query: 47

Check rate limit status


You can check the status of rate limit cost consumption for the operations you perform by inspecting the HTTP response headers.

Header name Description
x-rate-limit-cost-consumed The current amount of cost consumed from the limit
x-rate-limit-cost-limit The current cost limit per minute set for the namespace by Wowza
x-rate-limit-cost-request The cost of the current request
x-rate-limit-cost-reset The amount of time, in milliseconds, until the cost consumed resets

If you perform an operation in GraphiQL, you can use the Chrome DevTools Network panel to view the response headers.

Exceeded rate limits


If you perform an operation that exceeds the one-minute rate limit set for your namespace, your operation will return a 429 "Rate Limit Reached" error.