Varnish vs Webpack

Get Advice Icon

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

Varnish
Varnish

10.1K
892
+ 1
356
Webpack
Webpack

12.2K
8.3K
+ 1
740
Add tool

Varnish vs Webpack: What are the differences?

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; Webpack: A bundler for javascript and friends. A bundler for javascript and friends. Packs many modules into a few bundled assets. Code Splitting allows to load parts for the application on demand. Through "loaders" modules can be CommonJs, AMD, ES6 modules, CSS, Images, JSON, Coffeescript, LESS, ... and your custom stuff.

Varnish belongs to "Web Cache" category of the tech stack, while Webpack can be primarily classified under "JS Build Tools / JS Task Runners".

"High-performance", "Very Fast" and "Very Stable" are the key factors why developers consider Varnish; whereas "Most powerful bundler", "Built-in dev server with livereload" and "Can handle all types of assets" are the primary reasons why Webpack is favored.

Varnish and Webpack are both open source tools. Webpack with 49.8K GitHub stars and 6.27K forks on GitHub appears to be more popular than Varnish with 908 GitHub stars and 216 GitHub forks.

Airbnb, Instagram, and Pinterest are some of the popular companies that use Webpack, whereas Varnish is used by Pinterest, 9GAG, and Twitch. Webpack has a broader approval, being mentioned in 2208 company stacks & 1341 developers stacks; compared to Varnish, which is listed in 1006 company stacks and 140 developer stacks.

What is Varnish?

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.

What is Webpack?

A bundler for javascript and friends. Packs many modules into a few bundled assets. Code Splitting allows to load parts for the application on demand. Through "loaders" modules can be CommonJs, AMD, ES6 modules, CSS, Images, JSON, Coffeescript, LESS, ... and your custom stuff.
Get Advice Icon

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

Why do developers choose Varnish?
Why do developers choose Webpack?

Sign up to add, upvote and see more prosMake informed product decisions

    Be the first to leave a con
    What companies use Varnish?
    What companies use Webpack?

    Sign up to get full access to all the companiesMake informed product decisions

    What tools integrate with Varnish?
    What tools integrate with Webpack?

    Sign up to get full access to all the tool integrationsMake informed product decisions

    What are some alternatives to Varnish and Webpack?
    nginx
    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.
    Redis
    Redis is an open source, BSD licensed, advanced key-value store. It is often referred to as a data structure server since keys can contain strings, hashes, lists, sets and sorted sets.
    HAProxy
    HAProxy (High Availability Proxy) is a free, very fast and reliable solution offering high availability, load balancing, and proxying for TCP and HTTP-based applications.
    Apache Traffic Server
    It is a fast, scalable and extensible HTTP/1.1 and HTTP/2.0 compliant caching proxy server.Improve your response time, while reducing server load and bandwidth needs by caching and reusing frequently-requested web pages, images, and web ser
    Section
    Edge Compute Platform gives Dev and Ops engineers the access and control they need to run compute workloads on a distributed edge.
    See all alternatives
    Decisions about Varnish and Webpack
    JavaScript
    JavaScript
    jQuery
    jQuery
    gulp
    gulp
    Webpack
    Webpack

    I use JavaScript these days and for few years I didn't have to use jQuery at all. I used to use it back in the days when IE8 and similar was a thing. But due to better browser support of native functions for DOM manipulation I could move to vanilla JavaScript. Most of the time, that's all I need to work with modals/accordions and similar. But I'm not saying that jQuery is bad. It was, and still is a great tool. Some of it's features are available in all browsers nowadays so it is not so important as it used to be. But jQuery has still advantage for example in it's selector engine, some DOM selections which are easy in jQuery are a bit more difficult in vanilla JS (you have to create some helper functions or use some 3rd party library to help you with that), but to be honest I needed this on very few occasions. So it really depends on your project (supported browses, plain JS or some bundling - gulp, Webpack, whether you plan to use modules etc.). Hope this helps.

    See more
    Gustavo Muñoz
    Gustavo Muñoz
    Web UI Developer at Globant · | 4 upvotes · 184.9K views
    Webpack
    Webpack
    Grunt
    Grunt
    gulp
    gulp
    Parcel
    Parcel
    #Merge
    #WebPackDevServer

    Using Webpack is one of the best decision ever. I have used to Grunt and gulp previously, but the experience is not the same, and despite I know there are other bundlers like Parcel, Webpack gives me the perfect balance between automatization and configuration. The ecosystem of tools and loaders is amazing, and with WebPack #merge, you can modularize your build and define standard pieces to assemble different build configurations. I don't like processes where you cannot see their guts, and you have to trust in magic a little bit too much for my taste. But also I don't want to reinvent the wheel and lose too much time configuring my build processes. And of course, I love #WebPackDevServer and hot reloading.

    See more
    Interest over time
    Reviews of Varnish and Webpack
    Review ofVarnishVarnish

    Thank you for posting such a great article! I found your website perfect for my needs. It contains wonderful and helpful posts. Keep up the good work!. Thank you for this wonderful Article! five nights at freddy's

    How developers use Varnish and Webpack
    Avatar of Volkan Özçelik
    Volkan Özçelik uses WebpackWebpack

    Webpack is the best bundler. Period.

    Yes, it has a(n arguably) messy documentation, and a steep learning curve; but once you get the hang of it, there is nothing you cannot do with it.

    Use it and you don’t have to use any other bundler at all.

    It has a vivid ecosystem, and great plugin support.

    Avatar of Pinterest
    Pinterest uses VarnishVarnish

    When you visit the site, you talk to a load balancer which chooses a varnish front-end which in turn talks to our web front-ends which used to run nine python processes. Each of these processes are serving the exact same version on any given web front-end.

    Avatar of The Independent
    The Independent uses VarnishVarnish

    Varnish sits as a secondary cache layer behind Akamai. Two servers operate in a Primary/Secondary configuration with failover managed by HAProxy. Requests peak at around 10k/s.

    Avatar of Alec Cunningham
    Alec Cunningham uses WebpackWebpack

    My preferred build tool; allows me to bundle my JSX, JS, CSS files for easy access and I can pass the bundle through my node server for server side rendering.

    Avatar of Kent Steiner
    Kent Steiner uses WebpackWebpack

    Flexible building and compiling of source for browser consumption, mainly for JS, but experimenting a little with CSS (although I prefer StylusJS for CSS).

    Avatar of Andrew Gatenby
    Andrew Gatenby uses WebpackWebpack

    We use this to optimise the delivery of the client-side for our revised Admin System, so it's able to be delivered to browsers as efficiently as possible.

    Avatar of Cameron Drake
    Cameron Drake uses WebpackWebpack

    Webpack compiles files to bundles with source maps. Using Webpack you can use the latest features (ES6) and have it compiled to compliant js.

    Avatar of Hevelop
    Hevelop uses VarnishVarnish

    Varnish is the http cache proxy we use to achieve maximum performance on high traffic e-commerce.

    Avatar of Pruvit
    Pruvit uses VarnishVarnish

    Used as part of site hosting (Firebase HTTP Hosting manages implementation)

    Avatar of Reactor Digital
    Reactor Digital uses VarnishVarnish

    Caching static content requested by Drupal.

    How much does Varnish cost?
    How much does Webpack cost?
    Pricing unavailable
    Pricing unavailable