When comparing Nginx vs Traefik, the Slant community recommends Nginx for most people. In the question“What are the best web servers?” Nginx is ranked 1st while Traefik is ranked 6th.
Specs
Ranked in these QuestionsQuestion Ranking
Pros
Pro Free and open source
Pro Fast and built for scalability
Nginx is event-driven, asynchronous, non-blocking and single threaded (one master process + worker processes). This allows nginx to be manage resources more efficiently compared to thread-based models (like Apache).
Pro Lightweight
Nginx offers a more basic set of functions out of the box compared most web servers. Extra functionality can be added via modules.
Pro Highly efficient memory use
Pro Highly efficient CPU use
Pro Advanced load balancing and caching
Pro Event Based Request Handling
Does not fork/thread per request.
Pro Easily configurable
Configuration files are concise and simple.
Pro Auto-discovery
You just add labels to your Docker, Swarm or K8s containers and they get proxied automagically, If you set up everything correctly.
Pro Easy to set up
Add your docker network and labels to your services and get it running fast.
Cons
Con Http/Https only
E.g. doesn't allow you to route IMAP/SMTP traffic.