NGINX vs Varnish

Need advice about which tool to choose?Ask the StackShare community!

NGINX

106.2K
55.3K
+ 1
5.5K
Varnish

12K
2.4K
+ 1
370
Add tool

nginx vs Varnish: What are the differences?

nginx: A high performance free open source web server powering busiest sites on the Internet. nginx [engine x] is an HTTP and reverse proxy server, as well as a mail proxy server, written by Igor Sysoev. According to Netcraft nginx served or proxied 30.46% of the top million busiest sites in Jan 2018; Varnish: High-performance HTTP accelerator. Varnish Cache is a web application accelerator also known as a caching HTTP reverse proxy. You install it in front of any server that speaks HTTP and configure it to cache the contents. Varnish Cache is really, really fast. It typically speeds up delivery with a factor of 300 - 1000x, depending on your architecture.

nginx belongs to "Web Servers" category of the tech stack, while Varnish can be primarily classified under "Web Cache".

"High-performance http server", "Performance" and "Easy to configure" are the key factors why developers consider nginx; whereas "High-performance", "Very Fast" and "Very Stable" are the primary reasons why Varnish is favored.

nginx and Varnish are both open source tools. nginx with 9.11K GitHub stars and 3.44K forks on GitHub appears to be more popular than Varnish with 908 GitHub stars and 216 GitHub forks.

According to the StackShare community, nginx has a broader approval, being mentioned in 8676 company stacks & 2560 developers stacks; compared to Varnish, which is listed in 1006 company stacks and 140 developer stacks.

Advice on NGINX and Varnish

I am diving into web development, both front and back end. I feel comfortable with administration, scripting and moderate coding in bash, Python and C++, but I am also a Windows fan (i love inner conflict). What are the votes on web servers? IIS is expensive and restrictive (has Windows adoption of open source changed this?) Apache has the history but seems to be at the root of most of my Infosec issues, and I know nothing about nginx (is it too new to rely on?). And no, I don't know what I want to do on the web explicitly, but hosting and data storage (both cloud and tape) are possibilities. Ready, aim fire!

See more
Replies (1)
Simon Aronsson
Developer Advocate at k6 / Load Impact · | 4 upvotes · 505.1K views
Recommends
on
NGINXNGINX

I would pick nginx over both IIS and Apace HTTP Server any day. Combine it with docker, and as you grow maybe even traefik, and you'll have a really flexible solution for serving http content where you can take sites and projects up and down without effort, easily move it between systems and dont have to handle any dependencies on your actual local machine.

See more
Needs advice
on
Apache HTTP ServerApache HTTP Server
and
NGINXNGINX

From a StackShare Community member: "We are a LAMP shop currently focused on improving web performance for our customers. We have made many front-end optimizations and now we are considering replacing Apache with nginx. I was wondering if others saw a noticeable performance gain or any other benefits by switching."

See more
Replies (3)
Recommends
on
NGINXNGINX

I use nginx because it is very light weight. Where Apache tries to include everything in the web server, nginx opts to have external programs/facilities take care of that so the web server can focus on efficiently serving web pages. While this can seem inefficient, it limits the number of new bugs found in the web server, which is the element that faces the client most directly.

See more
Leandro Barral
Recommends
on
NGINXNGINX

I use nginx because its more flexible and easy to configure

See more
Christian Cwienk
Software Developer at SAP · | 1 upvotes · 480.6K views
Recommends
on
Apache HTTP ServerApache HTTP Server

I use Apache HTTP Server because it's intuitive, comprehensive, well-documented, and just works

See more
Get Advice from developers at your company using StackShare Enterprise. Sign up for StackShare Enterprise.
Learn More
Pros of NGINX
Pros of Varnish
  • 1.4K
    High-performance http server
  • 894
    Performance
  • 729
    Easy to configure
  • 607
    Open source
  • 530
    Load balancer
  • 288
    Free
  • 288
    Scalability
  • 224
    Web server
  • 175
    Simplicity
  • 136
    Easy setup
  • 30
    Content caching
  • 21
    Web Accelerator
  • 15
    Capability
  • 14
    Fast
  • 12
    Predictability
  • 12
    High-latency
  • 8
    Reverse Proxy
  • 7
    The best of them
  • 7
    Supports http/2
  • 5
    Enterprise version
  • 5
    Great Community
  • 5
    Lots of Modules
  • 4
    High perfomance proxy server
  • 3
    Streaming media delivery
  • 3
    Reversy Proxy
  • 3
    Streaming media
  • 3
    Embedded Lua scripting
  • 2
    GRPC-Web
  • 2
    Blash
  • 2
    Lightweight
  • 2
    Fast and easy to set up
  • 2
    Slim
  • 2
    saltstack
  • 1
    Virtual hosting
  • 1
    Narrow focus. Easy to configure. Fast
  • 1
    Along with Redis Cache its the Most superior
  • 1
    Ingress controller
  • 104
    High-performance
  • 67
    Very Fast
  • 57
    Very Stable
  • 44
    Very Robust
  • 37
    HTTP reverse proxy
  • 21
    Open Source
  • 18
    Web application accelerator
  • 11
    Easy to config
  • 5
    Widely Used
  • 4
    Great community
  • 2
    Essential software for HTTP

Sign up to add or upvote prosMake informed product decisions

Cons of NGINX
Cons of Varnish
  • 8
    Advanced features require subscription
    Be the first to leave a con

    Sign up to add or upvote consMake informed product decisions