SlideShare a Scribd company logo
1 of 33
Download to read offline
Janus & Docker:
friends or foe?
Alessandro Amirante
@alexamirante
Outline
● Microservices & Docker
● Janus as a microservice: issues and takeaways
○ Docker networking explained
● Examples of Docker-based complex architectures
○ IETF RPS
○ Recordings production
2
Applications transformation
3
Microservices
4
Docker
● Open source platform for developing,
shipping and running applications using
container virtualization technology
● De-facto standard container technology
● Containers share the same OS kernel
● Avoid replicating (virtualizing) guest OS,
RAM, CPUs, ...
● Containers are isolated from each
other, but can share resources
○ File system volumes
○ Networks
○ … 5
Janus® WebRTC server
6
®
Deployment experience
7
Deploying Janus
● Bare metal
● Virtual Machines
● Docker containers
● Cloud instances
● A mix of the above
8
Containers deployment strategies
● Most WebRTC failures are network-related
● Different networking modes are available
for containers
○ Host
○ NAT
○ Dedicated IP
● Choosing the most appropriate one is the
main challenge
● Spoiler alert: dedicated IP addresses for the
win!
9
Docker networking
10
● The Container Networking Model (CNM)
specifies the networking architecture
for containers technology
○ Sandboxes
○ Endpoints
○ Networks
● Libnetwork
○ Docker’s native implementation of the CNM
○ Leverages the Linux kernel implementation
of the network stack
○ 4 built-in network drivers: host, bridge,
overlay, macvlan
● Docker networking can be tricky!
Network drivers: host
● Containers use the network stack of the host machine
○ No namespaces
○ All host ifaces can be directly used by the container
● Easiest networking mode
● Network ports conflicts need to be avoided
● Limits the number of containers running on the same host
● Auto-scaling is difficult
11
Network drivers: bridge
● Docker’s default network mode
● Implements NAT functionality
● Containers on the same bridge network communicate over LAN
● Containers on different bridge networks need routing
● Port mapping needed for reachability from the outside
○ Conflicts need to be avoided
12
Docker NAT functionality (1/2)
● Docker’s NAT behavior appears to be address independent
(at a first glance)
○ Port Restricted Cone NAT
○ Check out the Janus recently enhanced test_stun feature
● In a dev environment, using the bridge driver is quite a
common choice
● ICE set up expected to succeed thanks to peer reflexive
candidates
● ICE randomly failed :(
○ The Streaming plugin was mostly affected by such failures
○ EchoTest plugin not affected
○ VideoRoom plugin only affected for subscribers 13
Docker NAT functionality (2/2)
● Turned out to depend on which party sends the JSEP offer
○ Browser offers, Janus answers → ICE succeeds
○ Janus offers, browser answers → ICE fails
● Tracked down this behavior to libnetfilter, upon which
Docker’s libnetwork is based
● The Docker NAT is not address independent!
○ It sometimes acts like a symmetric NAT
14
ICE failure example
15
ICE failure example
16
ICE success example
17
ICE success example
18
ICE success example
19
ICE success example
20
Takeaways
● Docker networking can be tricky when dealing with ICE
● Host networking limits the number of containers running on the same host
● Ports mapping is not ideal when you want to scale a service up/down as needed
● NATed networks should be fine in a controlled environment, but…
● … things get weird when the browser is also behind a NAT
○ Firefox multiprocess has a built in UDP packet filter
● The new obfuscation of host candidates through mDNS makes things even
worse!
○ Chrome and Safari already there, Firefox coming soon
● Dedicated IP addresses to containers for the win!
○ Macvlan
○ Pipework 21
Macvlan
● Docker built-in network driver
● Allows a single (host) physical
iface to have multiple MAC and
IP addresses to assign to
containers
● No need for port publishing
22
Pipework
● Tool for connecting together containers in arbitrarily complex scenarios
● https://github.com/jpetazzo/pipework
● Allows to create a new network interface inside a container and set
networking parameters (IP address, netmask, gateway, ...)
○ This new interface becomes the default one for the container
23
$ pipework <hostinterface> [-i containerinterface] <guest>
<ipaddr>/<subnet>[@default_gateway] [macaddr][@vlan]
$ pipework <hostinterface> [-i containerinterface] <guest>
dhcp [macaddr][@vlan]
● If you want to use both IPv4 and IPV6, the IPv6 interface has to be
created first
● The whole IETF Remote Participation Service is based upon Docker
● The NOC team deploys bare metal servers at meeting venues
● Four VMs running on different servers are dedicated to the remote participation
service
● VMs host a bunch of Docker containers
○ Janus
○ Asterisk
○ Tomcat 1 instance of the Meetecho RPS
○ Redis + Node.js (containers share the network stack and have public IPv4 and IPv6 addresses)
○ Nginx
● Eight instances of the Meetecho RPS (one per room)
○ Split on two different VMs
○ A third VM is left idle for failover → containers migration if needed
● Other containers (stats, auth service, TURN, …) running on the fourth VM
Example: IETF Remote Participation
24
Melter: a Docker Swarm cluster
for recordings production
25
Janus recording functionality
26
● Janus records individual contributions into MJR files
● MJRs can be converted into Opus/Wave/WebM/MP4 playable
files via the janus-pp-rec tool shipped with Janus
● Individual contributions can be merged together into a single
audio/video file
○ Timing information need to be taken into account to properly sync
media
○ Other info might be needed as well, e.g., time of the first keyframe
written into the MJR
Meetecho Melter
● A solution for converting MJR files into videos according to a
given layout
● Leverages the MLT Multimedia Framework
○ https://www.mltframework.org/
● Post-processing and encoding happen on a cluster of
machines hosting Docker containers
○ Initially implemented with CoreOS
○ Moved to Docker native Swarm mode
27
Docker Swarm
● Cluster management and orchestration embedded in Docker engine
● Docker engine = swarm node
○ Manager(s)
■ Maintain cluster state through Raft consensus
■ Schedule services
■ Serve the swarm HTTP API
○ Worker(s)
■ Run containers scheduled by managers
● Fault tolerance
○ Containers are re-scheduled if a node
fails
○ The cluster can tolerate up to (N-1)/2
managers failing 28
● Leverage a number of bare metal servers as swarm nodes
● Set the maximum number of containers per node according to nodes’ specs
● Schedule containers according to the above limits
● Solution: exploit Docker networks and the swarm scheduler in a “hacky” way
Challenges
29
Swarm-scoped Macvlan network
● On each swarm node create a network configuration
○ The network will have a limited number of IP addresses available (via subnetting)
○ The --aux-address option excludes an IP address from the usable ones
○ Must define non-overlapping ranges of addresses among all nodes
● On the Swarm manager, create a swarm-scoped network from the
defined config
30
$ docker network create --config-only --subnet
192.168.100.0/24 --ip-range 192.168.100.0/29 --gateway
192.168.100.254 --aux-address "a=192.168.100.1" --aux-address
"b=192.168.100.2" meltnet-config
$ docker network create --config-from meltnet-config --scope
swarm -d macvlan meltnet
Swarm-scoped Macvlan network
● The manager spawns containers on
the swarm from a docker stack
descriptor
● Each container is plumbed into the
meltnet network
● If a node runs out of IP addresses,
new containers will not be allocated
there until one becomes available
again
● Containers also leverage the NFS
volume driver to read/write to a
shared Network Attached Storage 31
Output
32
Thank you!
Questions?
33

More Related Content

What's hot

Open vSwitch Offload: Conntrack and the Upstream Kernel
Open vSwitch Offload: Conntrack and the Upstream KernelOpen vSwitch Offload: Conntrack and the Upstream Kernel
Open vSwitch Offload: Conntrack and the Upstream KernelNetronome
 
Multistream in Janus @ CommCon 2019
Multistream in Janus @ CommCon 2019Multistream in Janus @ CommCon 2019
Multistream in Janus @ CommCon 2019Lorenzo Miniero
 
[KubeCon EU 2022] Running containerd and k3s on macOS
[KubeCon EU 2022] Running containerd and k3s on macOS[KubeCon EU 2022] Running containerd and k3s on macOS
[KubeCon EU 2022] Running containerd and k3s on macOSAkihiro Suda
 
Room 2 - 4 - Juncheng Anthony Lin - Redhat - A Practical Approach to Traditio...
Room 2 - 4 - Juncheng Anthony Lin - Redhat - A Practical Approach to Traditio...Room 2 - 4 - Juncheng Anthony Lin - Redhat - A Practical Approach to Traditio...
Room 2 - 4 - Juncheng Anthony Lin - Redhat - A Practical Approach to Traditio...Vietnam Open Infrastructure User Group
 
Janus RTP forwarders @ FOSDEM 2020
Janus RTP forwarders @ FOSDEM 2020Janus RTP forwarders @ FOSDEM 2020
Janus RTP forwarders @ FOSDEM 2020Lorenzo Miniero
 
BIRD Routing Daemon
BIRD Routing DaemonBIRD Routing Daemon
BIRD Routing DaemonAPNIC
 
Troubleshooting containerized triple o deployment
Troubleshooting containerized triple o deploymentTroubleshooting containerized triple o deployment
Troubleshooting containerized triple o deploymentSadique Puthen
 
Container Security
Container SecurityContainer Security
Container SecuritySalman Baset
 
Docker introduction &amp; benefits
Docker introduction &amp; benefitsDocker introduction &amp; benefits
Docker introduction &amp; benefitsAmit Manwade
 
Using MikroTik routers for BGP transit and IX points
Using MikroTik routers for BGP transit and IX points  Using MikroTik routers for BGP transit and IX points
Using MikroTik routers for BGP transit and IX points Pavel Odintsov
 
Docker Security workshop slides
Docker Security workshop slidesDocker Security workshop slides
Docker Security workshop slidesDocker, Inc.
 
Gérer sa dette technique avec SonarQube
Gérer sa dette technique avec SonarQubeGérer sa dette technique avec SonarQube
Gérer sa dette technique avec SonarQubePierre-Henri Gache
 
Room 3 - 1 - Nguyễn Xuân Trường Lâm - Zero touch on-premise storage infrastru...
Room 3 - 1 - Nguyễn Xuân Trường Lâm - Zero touch on-premise storage infrastru...Room 3 - 1 - Nguyễn Xuân Trường Lâm - Zero touch on-premise storage infrastru...
Room 3 - 1 - Nguyễn Xuân Trường Lâm - Zero touch on-premise storage infrastru...Vietnam Open Infrastructure User Group
 
Virtualization Vs. Containers
Virtualization Vs. ContainersVirtualization Vs. Containers
Virtualization Vs. Containersactualtechmedia
 
LinuxCon 2015 Linux Kernel Networking Walkthrough
LinuxCon 2015 Linux Kernel Networking WalkthroughLinuxCon 2015 Linux Kernel Networking Walkthrough
LinuxCon 2015 Linux Kernel Networking WalkthroughThomas Graf
 
Introduction to Docker - 2017
Introduction to Docker - 2017Introduction to Docker - 2017
Introduction to Docker - 2017Docker, Inc.
 
virtualization-vs-containerization-paas
virtualization-vs-containerization-paasvirtualization-vs-containerization-paas
virtualization-vs-containerization-paasrajdeep
 
Inside Architecture of Neutron
Inside Architecture of NeutronInside Architecture of Neutron
Inside Architecture of Neutronmarkmcclain
 
Ceph with CloudStack
Ceph with CloudStackCeph with CloudStack
Ceph with CloudStackShapeBlue
 
OpenStack High Availability
OpenStack High AvailabilityOpenStack High Availability
OpenStack High AvailabilityJakub Pavlik
 

What's hot (20)

Open vSwitch Offload: Conntrack and the Upstream Kernel
Open vSwitch Offload: Conntrack and the Upstream KernelOpen vSwitch Offload: Conntrack and the Upstream Kernel
Open vSwitch Offload: Conntrack and the Upstream Kernel
 
Multistream in Janus @ CommCon 2019
Multistream in Janus @ CommCon 2019Multistream in Janus @ CommCon 2019
Multistream in Janus @ CommCon 2019
 
[KubeCon EU 2022] Running containerd and k3s on macOS
[KubeCon EU 2022] Running containerd and k3s on macOS[KubeCon EU 2022] Running containerd and k3s on macOS
[KubeCon EU 2022] Running containerd and k3s on macOS
 
Room 2 - 4 - Juncheng Anthony Lin - Redhat - A Practical Approach to Traditio...
Room 2 - 4 - Juncheng Anthony Lin - Redhat - A Practical Approach to Traditio...Room 2 - 4 - Juncheng Anthony Lin - Redhat - A Practical Approach to Traditio...
Room 2 - 4 - Juncheng Anthony Lin - Redhat - A Practical Approach to Traditio...
 
Janus RTP forwarders @ FOSDEM 2020
Janus RTP forwarders @ FOSDEM 2020Janus RTP forwarders @ FOSDEM 2020
Janus RTP forwarders @ FOSDEM 2020
 
BIRD Routing Daemon
BIRD Routing DaemonBIRD Routing Daemon
BIRD Routing Daemon
 
Troubleshooting containerized triple o deployment
Troubleshooting containerized triple o deploymentTroubleshooting containerized triple o deployment
Troubleshooting containerized triple o deployment
 
Container Security
Container SecurityContainer Security
Container Security
 
Docker introduction &amp; benefits
Docker introduction &amp; benefitsDocker introduction &amp; benefits
Docker introduction &amp; benefits
 
Using MikroTik routers for BGP transit and IX points
Using MikroTik routers for BGP transit and IX points  Using MikroTik routers for BGP transit and IX points
Using MikroTik routers for BGP transit and IX points
 
Docker Security workshop slides
Docker Security workshop slidesDocker Security workshop slides
Docker Security workshop slides
 
Gérer sa dette technique avec SonarQube
Gérer sa dette technique avec SonarQubeGérer sa dette technique avec SonarQube
Gérer sa dette technique avec SonarQube
 
Room 3 - 1 - Nguyễn Xuân Trường Lâm - Zero touch on-premise storage infrastru...
Room 3 - 1 - Nguyễn Xuân Trường Lâm - Zero touch on-premise storage infrastru...Room 3 - 1 - Nguyễn Xuân Trường Lâm - Zero touch on-premise storage infrastru...
Room 3 - 1 - Nguyễn Xuân Trường Lâm - Zero touch on-premise storage infrastru...
 
Virtualization Vs. Containers
Virtualization Vs. ContainersVirtualization Vs. Containers
Virtualization Vs. Containers
 
LinuxCon 2015 Linux Kernel Networking Walkthrough
LinuxCon 2015 Linux Kernel Networking WalkthroughLinuxCon 2015 Linux Kernel Networking Walkthrough
LinuxCon 2015 Linux Kernel Networking Walkthrough
 
Introduction to Docker - 2017
Introduction to Docker - 2017Introduction to Docker - 2017
Introduction to Docker - 2017
 
virtualization-vs-containerization-paas
virtualization-vs-containerization-paasvirtualization-vs-containerization-paas
virtualization-vs-containerization-paas
 
Inside Architecture of Neutron
Inside Architecture of NeutronInside Architecture of Neutron
Inside Architecture of Neutron
 
Ceph with CloudStack
Ceph with CloudStackCeph with CloudStack
Ceph with CloudStack
 
OpenStack High Availability
OpenStack High AvailabilityOpenStack High Availability
OpenStack High Availability
 

Similar to Janus & docker: friends or foe

Building a sdn solution for the deployment of web application stacks in docker
Building a sdn solution for the deployment of web application stacks in dockerBuilding a sdn solution for the deployment of web application stacks in docker
Building a sdn solution for the deployment of web application stacks in dockerJorge Juan Mendoza
 
Docker Networking : 0 to 60mph slides
Docker Networking : 0 to 60mph slidesDocker Networking : 0 to 60mph slides
Docker Networking : 0 to 60mph slidesDocker, Inc.
 
Docker Networking - Current Status and goals of Experimental Networking
Docker Networking - Current Status and goals of Experimental NetworkingDocker Networking - Current Status and goals of Experimental Networking
Docker Networking - Current Status and goals of Experimental NetworkingSreenivas Makam
 
The internals and the latest trends of container runtimes
The internals and the latest trends of container runtimesThe internals and the latest trends of container runtimes
The internals and the latest trends of container runtimesAkihiro Suda
 
Containerization & Docker - Under the Hood
Containerization & Docker - Under the HoodContainerization & Docker - Under the Hood
Containerization & Docker - Under the HoodImesha Sudasingha
 
Swarm: Native Docker Clustering
Swarm: Native Docker ClusteringSwarm: Native Docker Clustering
Swarm: Native Docker ClusteringRoyee Tager
 
Network Design patters with Docker
Network Design patters with DockerNetwork Design patters with Docker
Network Design patters with DockerDaniel Finneran
 
Coredns nodecache - A highly-available Node-cache DNS server
Coredns nodecache - A highly-available Node-cache DNS serverCoredns nodecache - A highly-available Node-cache DNS server
Coredns nodecache - A highly-available Node-cache DNS serverYann Hamon
 
Talk on PHP Day Uruguay about Docker
Talk on PHP Day Uruguay about DockerTalk on PHP Day Uruguay about Docker
Talk on PHP Day Uruguay about DockerWellington Silva
 
Deploying containers and managing them on multiple Docker hosts, Docker Meetu...
Deploying containers and managing them on multiple Docker hosts, Docker Meetu...Deploying containers and managing them on multiple Docker hosts, Docker Meetu...
Deploying containers and managing them on multiple Docker hosts, Docker Meetu...dotCloud
 
[KubeCon NA 2020] containerd: Rootless Containers 2020
[KubeCon NA 2020] containerd: Rootless Containers 2020[KubeCon NA 2020] containerd: Rootless Containers 2020
[KubeCon NA 2020] containerd: Rootless Containers 2020Akihiro Suda
 
Kubernetes from scratch at veepee sysadmins days 2019
Kubernetes from scratch at veepee   sysadmins days 2019Kubernetes from scratch at veepee   sysadmins days 2019
Kubernetes from scratch at veepee sysadmins days 2019🔧 Loïc BLOT
 
Neutron Network Namespaces and IPtables--A Technical Deep Dive
Neutron Network Namespaces and IPtables--A Technical Deep DiveNeutron Network Namespaces and IPtables--A Technical Deep Dive
Neutron Network Namespaces and IPtables--A Technical Deep DiveMirantis
 
Conatiner Networking with MidoNet
Conatiner Networking with MidoNetConatiner Networking with MidoNet
Conatiner Networking with MidoNetMidokuraUSA
 
LXC, Docker, and the future of software delivery | LinuxCon 2013
LXC, Docker, and the future of software delivery | LinuxCon 2013LXC, Docker, and the future of software delivery | LinuxCon 2013
LXC, Docker, and the future of software delivery | LinuxCon 2013dotCloud
 
LXC Docker and the Future of Software Delivery
LXC Docker and the Future of Software DeliveryLXC Docker and the Future of Software Delivery
LXC Docker and the Future of Software DeliveryDocker, Inc.
 
4. CNCF kubernetes Comparison of-existing-cni-plugins-for-kubernetes
4. CNCF kubernetes Comparison of-existing-cni-plugins-for-kubernetes4. CNCF kubernetes Comparison of-existing-cni-plugins-for-kubernetes
4. CNCF kubernetes Comparison of-existing-cni-plugins-for-kubernetesJuraj Hantak
 
Comparison of existing cni plugins for kubernetes
Comparison of existing cni plugins for kubernetesComparison of existing cni plugins for kubernetes
Comparison of existing cni plugins for kubernetesAdam Hamsik
 
To Russia with Love: Deploying Kubernetes in Exotic Locations On Prem
To Russia with Love: Deploying Kubernetes in Exotic Locations On PremTo Russia with Love: Deploying Kubernetes in Exotic Locations On Prem
To Russia with Love: Deploying Kubernetes in Exotic Locations On PremCloudOps2005
 

Similar to Janus & docker: friends or foe (20)

Building a sdn solution for the deployment of web application stacks in docker
Building a sdn solution for the deployment of web application stacks in dockerBuilding a sdn solution for the deployment of web application stacks in docker
Building a sdn solution for the deployment of web application stacks in docker
 
Docker Networking : 0 to 60mph slides
Docker Networking : 0 to 60mph slidesDocker Networking : 0 to 60mph slides
Docker Networking : 0 to 60mph slides
 
Docker Networking - Current Status and goals of Experimental Networking
Docker Networking - Current Status and goals of Experimental NetworkingDocker Networking - Current Status and goals of Experimental Networking
Docker Networking - Current Status and goals of Experimental Networking
 
The internals and the latest trends of container runtimes
The internals and the latest trends of container runtimesThe internals and the latest trends of container runtimes
The internals and the latest trends of container runtimes
 
Containerization & Docker - Under the Hood
Containerization & Docker - Under the HoodContainerization & Docker - Under the Hood
Containerization & Docker - Under the Hood
 
Swarm: Native Docker Clustering
Swarm: Native Docker ClusteringSwarm: Native Docker Clustering
Swarm: Native Docker Clustering
 
Network Design patters with Docker
Network Design patters with DockerNetwork Design patters with Docker
Network Design patters with Docker
 
Coredns nodecache - A highly-available Node-cache DNS server
Coredns nodecache - A highly-available Node-cache DNS serverCoredns nodecache - A highly-available Node-cache DNS server
Coredns nodecache - A highly-available Node-cache DNS server
 
Talk on PHP Day Uruguay about Docker
Talk on PHP Day Uruguay about DockerTalk on PHP Day Uruguay about Docker
Talk on PHP Day Uruguay about Docker
 
Deploying containers and managing them on multiple Docker hosts, Docker Meetu...
Deploying containers and managing them on multiple Docker hosts, Docker Meetu...Deploying containers and managing them on multiple Docker hosts, Docker Meetu...
Deploying containers and managing them on multiple Docker hosts, Docker Meetu...
 
[KubeCon NA 2020] containerd: Rootless Containers 2020
[KubeCon NA 2020] containerd: Rootless Containers 2020[KubeCon NA 2020] containerd: Rootless Containers 2020
[KubeCon NA 2020] containerd: Rootless Containers 2020
 
Kubernetes from scratch at veepee sysadmins days 2019
Kubernetes from scratch at veepee   sysadmins days 2019Kubernetes from scratch at veepee   sysadmins days 2019
Kubernetes from scratch at veepee sysadmins days 2019
 
Neutron Network Namespaces and IPtables--A Technical Deep Dive
Neutron Network Namespaces and IPtables--A Technical Deep DiveNeutron Network Namespaces and IPtables--A Technical Deep Dive
Neutron Network Namespaces and IPtables--A Technical Deep Dive
 
Networking in Openstack - Neutron 101
Networking in Openstack - Neutron 101Networking in Openstack - Neutron 101
Networking in Openstack - Neutron 101
 
Conatiner Networking with MidoNet
Conatiner Networking with MidoNetConatiner Networking with MidoNet
Conatiner Networking with MidoNet
 
LXC, Docker, and the future of software delivery | LinuxCon 2013
LXC, Docker, and the future of software delivery | LinuxCon 2013LXC, Docker, and the future of software delivery | LinuxCon 2013
LXC, Docker, and the future of software delivery | LinuxCon 2013
 
LXC Docker and the Future of Software Delivery
LXC Docker and the Future of Software DeliveryLXC Docker and the Future of Software Delivery
LXC Docker and the Future of Software Delivery
 
4. CNCF kubernetes Comparison of-existing-cni-plugins-for-kubernetes
4. CNCF kubernetes Comparison of-existing-cni-plugins-for-kubernetes4. CNCF kubernetes Comparison of-existing-cni-plugins-for-kubernetes
4. CNCF kubernetes Comparison of-existing-cni-plugins-for-kubernetes
 
Comparison of existing cni plugins for kubernetes
Comparison of existing cni plugins for kubernetesComparison of existing cni plugins for kubernetes
Comparison of existing cni plugins for kubernetes
 
To Russia with Love: Deploying Kubernetes in Exotic Locations On Prem
To Russia with Love: Deploying Kubernetes in Exotic Locations On PremTo Russia with Love: Deploying Kubernetes in Exotic Locations On Prem
To Russia with Love: Deploying Kubernetes in Exotic Locations On Prem
 

Recently uploaded

Presentation on Engagement in Book Clubs
Presentation on Engagement in Book ClubsPresentation on Engagement in Book Clubs
Presentation on Engagement in Book Clubssamaasim06
 
No Advance 8868886958 Chandigarh Call Girls , Indian Call Girls For Full Nigh...
No Advance 8868886958 Chandigarh Call Girls , Indian Call Girls For Full Nigh...No Advance 8868886958 Chandigarh Call Girls , Indian Call Girls For Full Nigh...
No Advance 8868886958 Chandigarh Call Girls , Indian Call Girls For Full Nigh...Sheetaleventcompany
 
Governance and Nation-Building in Nigeria: Some Reflections on Options for Po...
Governance and Nation-Building in Nigeria: Some Reflections on Options for Po...Governance and Nation-Building in Nigeria: Some Reflections on Options for Po...
Governance and Nation-Building in Nigeria: Some Reflections on Options for Po...Kayode Fayemi
 
Andrés Ramírez Gossler, Facundo Schinnea - eCommerce Day Chile 2024
Andrés Ramírez Gossler, Facundo Schinnea - eCommerce Day Chile 2024Andrés Ramírez Gossler, Facundo Schinnea - eCommerce Day Chile 2024
Andrés Ramírez Gossler, Facundo Schinnea - eCommerce Day Chile 2024eCommerce Institute
 
ANCHORING SCRIPT FOR A CULTURAL EVENT.docx
ANCHORING SCRIPT FOR A CULTURAL EVENT.docxANCHORING SCRIPT FOR A CULTURAL EVENT.docx
ANCHORING SCRIPT FOR A CULTURAL EVENT.docxNikitaBankoti2
 
Mathematics of Finance Presentation.pptx
Mathematics of Finance Presentation.pptxMathematics of Finance Presentation.pptx
Mathematics of Finance Presentation.pptxMoumonDas2
 
Introduction to Prompt Engineering (Focusing on ChatGPT)
Introduction to Prompt Engineering (Focusing on ChatGPT)Introduction to Prompt Engineering (Focusing on ChatGPT)
Introduction to Prompt Engineering (Focusing on ChatGPT)Chameera Dedduwage
 
VVIP Call Girls Nalasopara : 9892124323, Call Girls in Nalasopara Services
VVIP Call Girls Nalasopara : 9892124323, Call Girls in Nalasopara ServicesVVIP Call Girls Nalasopara : 9892124323, Call Girls in Nalasopara Services
VVIP Call Girls Nalasopara : 9892124323, Call Girls in Nalasopara ServicesPooja Nehwal
 
Mohammad_Alnahdi_Oral_Presentation_Assignment.pptx
Mohammad_Alnahdi_Oral_Presentation_Assignment.pptxMohammad_Alnahdi_Oral_Presentation_Assignment.pptx
Mohammad_Alnahdi_Oral_Presentation_Assignment.pptxmohammadalnahdi22
 
Navi Mumbai Call Girls Service Pooja 9892124323 Real Russian Girls Looking Mo...
Navi Mumbai Call Girls Service Pooja 9892124323 Real Russian Girls Looking Mo...Navi Mumbai Call Girls Service Pooja 9892124323 Real Russian Girls Looking Mo...
Navi Mumbai Call Girls Service Pooja 9892124323 Real Russian Girls Looking Mo...Pooja Nehwal
 
SaaStr Workshop Wednesday w/ Lucas Price, Yardstick
SaaStr Workshop Wednesday w/ Lucas Price, YardstickSaaStr Workshop Wednesday w/ Lucas Price, Yardstick
SaaStr Workshop Wednesday w/ Lucas Price, Yardsticksaastr
 
Re-membering the Bard: Revisiting The Compleat Wrks of Wllm Shkspr (Abridged)...
Re-membering the Bard: Revisiting The Compleat Wrks of Wllm Shkspr (Abridged)...Re-membering the Bard: Revisiting The Compleat Wrks of Wllm Shkspr (Abridged)...
Re-membering the Bard: Revisiting The Compleat Wrks of Wllm Shkspr (Abridged)...Hasting Chen
 
BDSM⚡Call Girls in Sector 93 Noida Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Sector 93 Noida Escorts >༒8448380779 Escort ServiceBDSM⚡Call Girls in Sector 93 Noida Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Sector 93 Noida Escorts >༒8448380779 Escort ServiceDelhi Call girls
 
Chiulli_Aurora_Oman_Raffaele_Beowulf.pptx
Chiulli_Aurora_Oman_Raffaele_Beowulf.pptxChiulli_Aurora_Oman_Raffaele_Beowulf.pptx
Chiulli_Aurora_Oman_Raffaele_Beowulf.pptxraffaeleoman
 
If this Giant Must Walk: A Manifesto for a New Nigeria
If this Giant Must Walk: A Manifesto for a New NigeriaIf this Giant Must Walk: A Manifesto for a New Nigeria
If this Giant Must Walk: A Manifesto for a New NigeriaKayode Fayemi
 
George Lever - eCommerce Day Chile 2024
George Lever -  eCommerce Day Chile 2024George Lever -  eCommerce Day Chile 2024
George Lever - eCommerce Day Chile 2024eCommerce Institute
 
CTAC 2024 Valencia - Sven Zoelle - Most Crucial Invest to Digitalisation_slid...
CTAC 2024 Valencia - Sven Zoelle - Most Crucial Invest to Digitalisation_slid...CTAC 2024 Valencia - Sven Zoelle - Most Crucial Invest to Digitalisation_slid...
CTAC 2024 Valencia - Sven Zoelle - Most Crucial Invest to Digitalisation_slid...henrik385807
 
Microsoft Copilot AI for Everyone - created by AI
Microsoft Copilot AI for Everyone - created by AIMicrosoft Copilot AI for Everyone - created by AI
Microsoft Copilot AI for Everyone - created by AITatiana Gurgel
 
CTAC 2024 Valencia - Henrik Hanke - Reduce to the max - slideshare.pdf
CTAC 2024 Valencia - Henrik Hanke - Reduce to the max - slideshare.pdfCTAC 2024 Valencia - Henrik Hanke - Reduce to the max - slideshare.pdf
CTAC 2024 Valencia - Henrik Hanke - Reduce to the max - slideshare.pdfhenrik385807
 
WhatsApp 📞 9892124323 ✅Call Girls In Juhu ( Mumbai )
WhatsApp 📞 9892124323 ✅Call Girls In Juhu ( Mumbai )WhatsApp 📞 9892124323 ✅Call Girls In Juhu ( Mumbai )
WhatsApp 📞 9892124323 ✅Call Girls In Juhu ( Mumbai )Pooja Nehwal
 

Recently uploaded (20)

Presentation on Engagement in Book Clubs
Presentation on Engagement in Book ClubsPresentation on Engagement in Book Clubs
Presentation on Engagement in Book Clubs
 
No Advance 8868886958 Chandigarh Call Girls , Indian Call Girls For Full Nigh...
No Advance 8868886958 Chandigarh Call Girls , Indian Call Girls For Full Nigh...No Advance 8868886958 Chandigarh Call Girls , Indian Call Girls For Full Nigh...
No Advance 8868886958 Chandigarh Call Girls , Indian Call Girls For Full Nigh...
 
Governance and Nation-Building in Nigeria: Some Reflections on Options for Po...
Governance and Nation-Building in Nigeria: Some Reflections on Options for Po...Governance and Nation-Building in Nigeria: Some Reflections on Options for Po...
Governance and Nation-Building in Nigeria: Some Reflections on Options for Po...
 
Andrés Ramírez Gossler, Facundo Schinnea - eCommerce Day Chile 2024
Andrés Ramírez Gossler, Facundo Schinnea - eCommerce Day Chile 2024Andrés Ramírez Gossler, Facundo Schinnea - eCommerce Day Chile 2024
Andrés Ramírez Gossler, Facundo Schinnea - eCommerce Day Chile 2024
 
ANCHORING SCRIPT FOR A CULTURAL EVENT.docx
ANCHORING SCRIPT FOR A CULTURAL EVENT.docxANCHORING SCRIPT FOR A CULTURAL EVENT.docx
ANCHORING SCRIPT FOR A CULTURAL EVENT.docx
 
Mathematics of Finance Presentation.pptx
Mathematics of Finance Presentation.pptxMathematics of Finance Presentation.pptx
Mathematics of Finance Presentation.pptx
 
Introduction to Prompt Engineering (Focusing on ChatGPT)
Introduction to Prompt Engineering (Focusing on ChatGPT)Introduction to Prompt Engineering (Focusing on ChatGPT)
Introduction to Prompt Engineering (Focusing on ChatGPT)
 
VVIP Call Girls Nalasopara : 9892124323, Call Girls in Nalasopara Services
VVIP Call Girls Nalasopara : 9892124323, Call Girls in Nalasopara ServicesVVIP Call Girls Nalasopara : 9892124323, Call Girls in Nalasopara Services
VVIP Call Girls Nalasopara : 9892124323, Call Girls in Nalasopara Services
 
Mohammad_Alnahdi_Oral_Presentation_Assignment.pptx
Mohammad_Alnahdi_Oral_Presentation_Assignment.pptxMohammad_Alnahdi_Oral_Presentation_Assignment.pptx
Mohammad_Alnahdi_Oral_Presentation_Assignment.pptx
 
Navi Mumbai Call Girls Service Pooja 9892124323 Real Russian Girls Looking Mo...
Navi Mumbai Call Girls Service Pooja 9892124323 Real Russian Girls Looking Mo...Navi Mumbai Call Girls Service Pooja 9892124323 Real Russian Girls Looking Mo...
Navi Mumbai Call Girls Service Pooja 9892124323 Real Russian Girls Looking Mo...
 
SaaStr Workshop Wednesday w/ Lucas Price, Yardstick
SaaStr Workshop Wednesday w/ Lucas Price, YardstickSaaStr Workshop Wednesday w/ Lucas Price, Yardstick
SaaStr Workshop Wednesday w/ Lucas Price, Yardstick
 
Re-membering the Bard: Revisiting The Compleat Wrks of Wllm Shkspr (Abridged)...
Re-membering the Bard: Revisiting The Compleat Wrks of Wllm Shkspr (Abridged)...Re-membering the Bard: Revisiting The Compleat Wrks of Wllm Shkspr (Abridged)...
Re-membering the Bard: Revisiting The Compleat Wrks of Wllm Shkspr (Abridged)...
 
BDSM⚡Call Girls in Sector 93 Noida Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Sector 93 Noida Escorts >༒8448380779 Escort ServiceBDSM⚡Call Girls in Sector 93 Noida Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Sector 93 Noida Escorts >༒8448380779 Escort Service
 
Chiulli_Aurora_Oman_Raffaele_Beowulf.pptx
Chiulli_Aurora_Oman_Raffaele_Beowulf.pptxChiulli_Aurora_Oman_Raffaele_Beowulf.pptx
Chiulli_Aurora_Oman_Raffaele_Beowulf.pptx
 
If this Giant Must Walk: A Manifesto for a New Nigeria
If this Giant Must Walk: A Manifesto for a New NigeriaIf this Giant Must Walk: A Manifesto for a New Nigeria
If this Giant Must Walk: A Manifesto for a New Nigeria
 
George Lever - eCommerce Day Chile 2024
George Lever -  eCommerce Day Chile 2024George Lever -  eCommerce Day Chile 2024
George Lever - eCommerce Day Chile 2024
 
CTAC 2024 Valencia - Sven Zoelle - Most Crucial Invest to Digitalisation_slid...
CTAC 2024 Valencia - Sven Zoelle - Most Crucial Invest to Digitalisation_slid...CTAC 2024 Valencia - Sven Zoelle - Most Crucial Invest to Digitalisation_slid...
CTAC 2024 Valencia - Sven Zoelle - Most Crucial Invest to Digitalisation_slid...
 
Microsoft Copilot AI for Everyone - created by AI
Microsoft Copilot AI for Everyone - created by AIMicrosoft Copilot AI for Everyone - created by AI
Microsoft Copilot AI for Everyone - created by AI
 
CTAC 2024 Valencia - Henrik Hanke - Reduce to the max - slideshare.pdf
CTAC 2024 Valencia - Henrik Hanke - Reduce to the max - slideshare.pdfCTAC 2024 Valencia - Henrik Hanke - Reduce to the max - slideshare.pdf
CTAC 2024 Valencia - Henrik Hanke - Reduce to the max - slideshare.pdf
 
WhatsApp 📞 9892124323 ✅Call Girls In Juhu ( Mumbai )
WhatsApp 📞 9892124323 ✅Call Girls In Juhu ( Mumbai )WhatsApp 📞 9892124323 ✅Call Girls In Juhu ( Mumbai )
WhatsApp 📞 9892124323 ✅Call Girls In Juhu ( Mumbai )
 

Janus & docker: friends or foe

  • 1. Janus & Docker: friends or foe? Alessandro Amirante @alexamirante
  • 2. Outline ● Microservices & Docker ● Janus as a microservice: issues and takeaways ○ Docker networking explained ● Examples of Docker-based complex architectures ○ IETF RPS ○ Recordings production 2
  • 5. Docker ● Open source platform for developing, shipping and running applications using container virtualization technology ● De-facto standard container technology ● Containers share the same OS kernel ● Avoid replicating (virtualizing) guest OS, RAM, CPUs, ... ● Containers are isolated from each other, but can share resources ○ File system volumes ○ Networks ○ … 5
  • 8. Deploying Janus ● Bare metal ● Virtual Machines ● Docker containers ● Cloud instances ● A mix of the above 8
  • 9. Containers deployment strategies ● Most WebRTC failures are network-related ● Different networking modes are available for containers ○ Host ○ NAT ○ Dedicated IP ● Choosing the most appropriate one is the main challenge ● Spoiler alert: dedicated IP addresses for the win! 9
  • 10. Docker networking 10 ● The Container Networking Model (CNM) specifies the networking architecture for containers technology ○ Sandboxes ○ Endpoints ○ Networks ● Libnetwork ○ Docker’s native implementation of the CNM ○ Leverages the Linux kernel implementation of the network stack ○ 4 built-in network drivers: host, bridge, overlay, macvlan ● Docker networking can be tricky!
  • 11. Network drivers: host ● Containers use the network stack of the host machine ○ No namespaces ○ All host ifaces can be directly used by the container ● Easiest networking mode ● Network ports conflicts need to be avoided ● Limits the number of containers running on the same host ● Auto-scaling is difficult 11
  • 12. Network drivers: bridge ● Docker’s default network mode ● Implements NAT functionality ● Containers on the same bridge network communicate over LAN ● Containers on different bridge networks need routing ● Port mapping needed for reachability from the outside ○ Conflicts need to be avoided 12
  • 13. Docker NAT functionality (1/2) ● Docker’s NAT behavior appears to be address independent (at a first glance) ○ Port Restricted Cone NAT ○ Check out the Janus recently enhanced test_stun feature ● In a dev environment, using the bridge driver is quite a common choice ● ICE set up expected to succeed thanks to peer reflexive candidates ● ICE randomly failed :( ○ The Streaming plugin was mostly affected by such failures ○ EchoTest plugin not affected ○ VideoRoom plugin only affected for subscribers 13
  • 14. Docker NAT functionality (2/2) ● Turned out to depend on which party sends the JSEP offer ○ Browser offers, Janus answers → ICE succeeds ○ Janus offers, browser answers → ICE fails ● Tracked down this behavior to libnetfilter, upon which Docker’s libnetwork is based ● The Docker NAT is not address independent! ○ It sometimes acts like a symmetric NAT 14
  • 21. Takeaways ● Docker networking can be tricky when dealing with ICE ● Host networking limits the number of containers running on the same host ● Ports mapping is not ideal when you want to scale a service up/down as needed ● NATed networks should be fine in a controlled environment, but… ● … things get weird when the browser is also behind a NAT ○ Firefox multiprocess has a built in UDP packet filter ● The new obfuscation of host candidates through mDNS makes things even worse! ○ Chrome and Safari already there, Firefox coming soon ● Dedicated IP addresses to containers for the win! ○ Macvlan ○ Pipework 21
  • 22. Macvlan ● Docker built-in network driver ● Allows a single (host) physical iface to have multiple MAC and IP addresses to assign to containers ● No need for port publishing 22
  • 23. Pipework ● Tool for connecting together containers in arbitrarily complex scenarios ● https://github.com/jpetazzo/pipework ● Allows to create a new network interface inside a container and set networking parameters (IP address, netmask, gateway, ...) ○ This new interface becomes the default one for the container 23 $ pipework <hostinterface> [-i containerinterface] <guest> <ipaddr>/<subnet>[@default_gateway] [macaddr][@vlan] $ pipework <hostinterface> [-i containerinterface] <guest> dhcp [macaddr][@vlan] ● If you want to use both IPv4 and IPV6, the IPv6 interface has to be created first
  • 24. ● The whole IETF Remote Participation Service is based upon Docker ● The NOC team deploys bare metal servers at meeting venues ● Four VMs running on different servers are dedicated to the remote participation service ● VMs host a bunch of Docker containers ○ Janus ○ Asterisk ○ Tomcat 1 instance of the Meetecho RPS ○ Redis + Node.js (containers share the network stack and have public IPv4 and IPv6 addresses) ○ Nginx ● Eight instances of the Meetecho RPS (one per room) ○ Split on two different VMs ○ A third VM is left idle for failover → containers migration if needed ● Other containers (stats, auth service, TURN, …) running on the fourth VM Example: IETF Remote Participation 24
  • 25. Melter: a Docker Swarm cluster for recordings production 25
  • 26. Janus recording functionality 26 ● Janus records individual contributions into MJR files ● MJRs can be converted into Opus/Wave/WebM/MP4 playable files via the janus-pp-rec tool shipped with Janus ● Individual contributions can be merged together into a single audio/video file ○ Timing information need to be taken into account to properly sync media ○ Other info might be needed as well, e.g., time of the first keyframe written into the MJR
  • 27. Meetecho Melter ● A solution for converting MJR files into videos according to a given layout ● Leverages the MLT Multimedia Framework ○ https://www.mltframework.org/ ● Post-processing and encoding happen on a cluster of machines hosting Docker containers ○ Initially implemented with CoreOS ○ Moved to Docker native Swarm mode 27
  • 28. Docker Swarm ● Cluster management and orchestration embedded in Docker engine ● Docker engine = swarm node ○ Manager(s) ■ Maintain cluster state through Raft consensus ■ Schedule services ■ Serve the swarm HTTP API ○ Worker(s) ■ Run containers scheduled by managers ● Fault tolerance ○ Containers are re-scheduled if a node fails ○ The cluster can tolerate up to (N-1)/2 managers failing 28
  • 29. ● Leverage a number of bare metal servers as swarm nodes ● Set the maximum number of containers per node according to nodes’ specs ● Schedule containers according to the above limits ● Solution: exploit Docker networks and the swarm scheduler in a “hacky” way Challenges 29
  • 30. Swarm-scoped Macvlan network ● On each swarm node create a network configuration ○ The network will have a limited number of IP addresses available (via subnetting) ○ The --aux-address option excludes an IP address from the usable ones ○ Must define non-overlapping ranges of addresses among all nodes ● On the Swarm manager, create a swarm-scoped network from the defined config 30 $ docker network create --config-only --subnet 192.168.100.0/24 --ip-range 192.168.100.0/29 --gateway 192.168.100.254 --aux-address "a=192.168.100.1" --aux-address "b=192.168.100.2" meltnet-config $ docker network create --config-from meltnet-config --scope swarm -d macvlan meltnet
  • 31. Swarm-scoped Macvlan network ● The manager spawns containers on the swarm from a docker stack descriptor ● Each container is plumbed into the meltnet network ● If a node runs out of IP addresses, new containers will not be allocated there until one becomes available again ● Containers also leverage the NFS volume driver to read/write to a shared Network Attached Storage 31