Have in mind that tuning Linux file descriptor limits (aka ulimits) will have impact in the performance of your Docker containers. These limits can be modified in different ways depending of the purpose:
- A GNU/Linux user can modify it’s own limits using the ulimit command.
- A GNU/Linux superuser can modify it’s system-wide limits editing the /etc/security/limits.conf file.
- When working with Docker we can set the container-wide limits using the ulimit parameter.
- As in AWS we can’t use Docker CLI directly, we won’t be able to add ulimit parameter. We will have to use ulimits configuration item when writing the EC2 Task Definition for the ECS cluster.
A pair of years ago InfoWorld published this short and useful article about this topic.