NGINX vs Varnish

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

NGINX

88.6K
39.5K
+ 1
5.5K
Varnish

11.1K
1.7K
+ 1
358
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 · | 3 upvotes · 146.2K views
Recommends
NGINX

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 Server
and
NGINX

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
NGINX

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
NGINX

I use nginx because its more flexible and easy to configure

See more
Christian Cwienk
Software Developer at SAP · | 1 upvotes · 139K views

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

See more
View all (3)
Get Advice from developers at your company using Private StackShare. Sign up for Private StackShare.
Learn More
Pros of NGINX
Pros of Varnish
  • 1.5K
    High-performance http server
  • 899
    Performance
  • 730
    Easy to configure
  • 606
    Open source
  • 529
    Load balancer
  • 286
    Scalability
  • 285
    Free
  • 222
    Web server
  • 174
    Simplicity
  • 133
    Easy setup
  • 29
    Content caching
  • 19
    Web Accelerator
  • 14
    Capability
  • 13
    Fast
  • 11
    Predictability
  • 10
    High-latency
  • 6
    Reverse Proxy
  • 6
    Fast and lightweight
  • 6
    Supports http/2
  • 4
    The best of them
  • 4
    Lots of Modules
  • 4
    Great Community
  • 4
    Enterprise version
  • 3
    Embedded Lua scripting
  • 3
    Reversy Proxy
  • 3
    Streaming media delivery
  • 3
    Streaming media
  • 3
    High perfomance proxy server
  • 2
    Lightweight
  • 2
    saltstack
  • 2
    Fast and easy to set up
  • 2
    Slim
  • 1
    GRPC-Web
  • 1
    Narrow focus. Easy to configure. Fast
  • 1
    Ingress controller
  • 1
    Along with Redis Cache its the Most superior
  • 1
    Virtual hosting
  • 0
    A
  • 102
    High-performance
  • 66
    Very Fast
  • 56
    Very Stable
  • 43
    Very Robust
  • 36
    HTTP reverse proxy
  • 20
    Open Source
  • 17
    Web application accelerator
  • 10
    Easy to config
  • 4
    Widely Used
  • 3
    Great community
  • 1
    Essential software for HTTP

Sign up to add or upvote prosMake informed product decisions

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

    Sign up to add or upvote consMake informed product decisions