What is the difference between the Built-in Cache and Varnish Cache for Full Page Cache?
What options do I have to choose? Why does Magento recommend Varnish?
Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. It only takes a minute to sign up.Sign up to join this community
"One common mistake when using Magento 2 is believing that Magento 2’s built in “Full Page Cache” feature is sufficient for performance. The Full Page Cache mode is labelled by Magento as to be used in development mode, as developers are not able to see what is being cached and what is not being cached with this setting. In production, it is strongly recommended all Magento 2 stores use Varnish Cache for optimal performance."
Magento recommends Varnish as the full page cache for a production site - the built in cache should be used for development.
Install varnish and configure Magento with the hostname or ip address and port of your varnish server
download a vcl configuration file generated by Magento to use with the varnish server.
make sure you add the external cache to the Magento configuration
php bin/magento setup:config:set --http-cache-hosts=varnishhost
Varnish is a much faster option and will give you the flexibility to cache most of your content, including the HTML document which reduces server load dramatically. You can view some instructions on how to install and troubleshoot Varnish + Magento 2 here, and there is a webinar on the same topic you can attend.