Server and client network apps simulated in one machine

95 views Asked by At

I would like to simulate a server machine and several client machines operating over a vpn. I would like to test the server application as well as the client applications all on one machine.

Would I be able to do this with a few docker applications running on my machine - or should I be using something like systemd-nspawn?

2

There are 2 answers

0
OrangeTux On BEST ANSWER

Yes. With linking containers, exposing and publishing[publish ports containers can communicate with each other or with the host machine.

1
Nathaniel Waisbrot On

It depends on what you're hoping to accomplish. If you want to perform end-to-end tests (for example, two chat clients connect and send each other messages through the server) then Docker is an excellent solution. If you want to do performance testing, then Docker is not a great fit (at least by itself).