Cluster statistic #6321
-
We have an ANTmedia cluster with multiple Origin and Edge nodes and a Load Balancer. Is there a way, perhaps using API or logging options, to obtain the list of published source streams associated with their Origin nodes and/or the list of streams with Edge nodes? In other words, can we create a comprehensive overview of the inbound and outbound streams within the cluster? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 8 replies
-
@rsarkisov82 You can use the get broadcast list API to get the stream data. You will get the response as below, in which you can see the node IP address (Origin or Edge) on which it was created. Check the highlighted field (originAdress) in the below response. [{"streamId":"test","status":"created","playListStatus":null,"type":"liveStream","publishType":null,"name":"test","description":null,"publish":true,"date":1715284969662,"plannedStartDate":0,"plannedEndDate":0,"duration":0,"endPointList":null,"playListItemList":null,"publicStream":true,"is360":false,"listenerHookURL":null,"category":null,"ipAddr":null,"username":null,"password":null,"quality":null,"speed":0.0,"streamUrl":null,"originAdress":"57.129.35.200","mp4Enabled":0,"webMEnabled":0,"seekTimeInMs":0,"encoderSettingsString":null,"expireDurationMS":0,"rtmpURL":"rtmp://57.129.35.234/LiveApp/test","zombi":false,"pendingPacketSize":0,"hlsViewerCount":0,"dashViewerCount":0,"webRTCViewerCount":0,"rtmpViewerCount":0,"startTime":0,"receivedBytes":0,"bitrate":0,"userAgent":"N/A","latitude":null,"longitude":null,"altitude":null,"mainTrackStreamId":null,"subTrackStreamIds":[],"absoluteStartTimeMs":0,"webRTCViewerLimit":-1,"hlsViewerLimit":-1,"dashViewerLimit":-1,"subFolder":null,"currentPlayIndex":0,"metaData":null,"playlistLoopEnabled":true,"updateTime":0,"autoStartStopEnabled":false,"encoderSettings":null,"anyoneWatching":false}] As per the recommended way, all streams should be published on the Origin servers and the Edge server should be used only to watch the streams by viewers. I hope it helps. |
Beta Was this translation helpful? Give feedback.
-
I tried to use Subscribers' API requests but they give me a blank response for some reason. Where do I miss something? The subscribers use the AMS player, like https://IP:5443/WebRTCAppEE/play.html?name=PROD-KILO03NEW |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
@rsarkisov82
If you use WebRTC for the playback, then you can pass the random subscriber ID while playing the stream, and then you can get the registered Edge Node IP via the subscriber list API. If you use AMS player then you can pass subscriberId like:
https://domain.antmedia.cloud/LiveApp/play.html?name=test&subscriberId=test
Here is the sample API response:
You can find the edge node IP in the highlighted field.
[{"subscriberId":"test","streamId":"test","type":null,"connected":true,"currentConcurrentConnections":134,"concurrentConnectionsLimit":1,"blockedType":null,"blockedUntilUnitTimeStampMs":0,"registeredNodeIp":"57.129.35.234"}]
I hope it helps.