paul nisset wrote:
Hi ,
Thank you for your responses.
I was thinking of using it more in the way Palak mentioned
You can set docker to configure the container the way you want and carry the same container across platforms - your in-premises network to an EC2 instance.
simulating the interaction between 20 different servers
seems like an interesting use for testing a service .
If I were to this would I create/copy a new Docker instance for each server that would be calling the service?
Thanks,
Paul
With respect to carrying the container across platforms, Docker is very useful for this. But it's worth being aware of the following caveats:
- You can run in to obscure kernel-related issues, especially if using unusual or 'bleeding edge' software (we talk about this in Chapter 12 in our book
https://www.manning.com/books/docker-in-practice)
- Data persistence can cause issues relating to 'data gravity'. While Docker containers can be easily 'lifted and shifted', and volumes offer a means of managing data, very often the real challenge with your deployments is managing large amounts of data associated with instances, and these can be harder to move.
- Related to the previous comment, Docker encourages an ephemeral architecture. If your application is not designed for this, it can limit the benefits of using Docker.
- Some Docker platforms (eg OpenShift) make subtle changes to the way applications are run (eg for security purposes, OpenShift does not allow containers to run as a specified user), and this can cause challenges
Regarding your second point: yes, that would be a great (and cheap and quick-to-run) use case for Docker (to model your multi-server set up). Be aware that Docker containers are not VMs and while they can be treated as such, you may run into issues (eg with no init process). We discuss this extensively in the book, as it's an area of great contention, as many feel this is an 'impure' approach. Our view is that Docker is a tool that can save your organisation money, and if microservices doesn't make sense for you then you shouldn't be forced to go that route - software is a means to a (usually business) end, and not the other way around. We cover these issues in chapters 3 (using Docker as a VM) and 8 (Network Simulation: Realistic Environment Testing Without the Pain), and in places throughout the book.