# How to switch Wowza to other CDN after reaching specified number of viewers?

**URL:** https://community.wowza.com/t/how-to-switch-wowza-to-other-cdn-after-reaching-specified-number-of-viewers/40884
**Category:** Wowza Streaming Engine
**Created:** [May 21, 2014, 11:36am UTC](https://community.wowza.com/t/how-to-switch-wowza-to-other-cdn-after-reaching-specified-number-of-viewers/40884 "2014-05-21T11:36:38Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Sebastian\_Reg](https://avatars.discourse-cdn.com/v4/letter/s/ac8455/32.png) [@Sebastian\_Reg](https://community.wowza.com/u/Sebastian_Reg)
#### Post date: [May 21, 2014, 11:36am UTC](https://community.wowza.com/t/how-to-switch-wowza-to-other-cdn-after-reaching-specified-number-of-viewers/40884/1 "2014-05-21T11:36:38Z")

</div>

Hi.

Like in the subject - is it possible to specify number of viewers and after reaching this number make Wowza 4 switch to other CDN?

Is there any instruction how to do it?

Thank you.

Sebastian

---

<div class="post-metadata">

### Author: ![Daren\_Johnson](https://avatars.discourse-cdn.com/v4/letter/d/ee59a6/32.png) [@Daren\_Johnson](https://community.wowza.com/u/Daren_Johnson)
#### Post date: [May 21, 2014, 11:23pm UTC](https://community.wowza.com/t/how-to-switch-wowza-to-other-cdn-after-reaching-specified-number-of-viewers/40884/2 "2014-05-21T23:23:36Z")

</div>

Hi,

This is possible, but would require some development. You would use the [Push Publishing API and sample code](https://www.wowza.com/docs/how-to-push-streams-to-cdns-and-other-services-push-publishing#api) to begin with.

Daren

---

<div class="post-metadata">

### Author: ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)
#### Post date: [May 22, 2014, 5:30pm UTC](https://community.wowza.com/t/how-to-switch-wowza-to-other-cdn-after-reaching-specified-number-of-viewers/40884/3 "2014-05-22T17:30:53Z")

</div>

Sebastian,

There is not a built-in, configurable way to do that. You use [this example](https://www.wowza.com/docs/how-to-limit-the-number-of-viewers-to-a-stream-modulelimitstreamviewers%28ModuleLimitStreamViewers%29) as a starting place (the source code is in the collection download), and instead of limiting playback, switch to the other CDN using the PushPublish API. There are more push api examples in [install-dir]/documentation/serverapi PushPublishRTMP

Richard

---

<div class="post-metadata">

### Author: ![Sebastian\_Reg](https://avatars.discourse-cdn.com/v4/letter/s/ac8455/32.png) [@Sebastian\_Reg](https://community.wowza.com/u/Sebastian_Reg)
#### Post date: [May 22, 2014, 5:08am UTC](https://community.wowza.com/t/how-to-switch-wowza-to-other-cdn-after-reaching-specified-number-of-viewers/40884/4 "2014-05-22T05:08:40Z")

</div>

Thank you.

Link in your post - I can not find information how to do it ? Can you give more details ?

I try imagine what for Wowza has functionality “push streams to other CDN” ?

Sebastian
