Varnish vs Webpack: What are the differences?
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?
What is Webpack?
Need advice about which tool to choose?Ask the StackShare community!
Sign up to add, upvote and see more prosMake informed product decisions
What are the cons of using Varnish?
Sign up to get full access to all the companiesMake informed product decisions
Sign up to get full access to all the tool integrationsMake informed product decisions
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.
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.
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.
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.
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.
Flexible building and compiling of source for browser consumption, mainly for JS, but experimenting a little with CSS (although I prefer StylusJS for CSS).
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.
Webpack compiles files to bundles with source maps. Using Webpack you can use the latest features (ES6) and have it compiled to compliant js.
Varnish is the http cache proxy we use to achieve maximum performance on high traffic e-commerce.