Architecture - 2.8 Infrastructure Requirements Flashcards
Caching: Varnish, Redis, Memcached
- Magento can function with just PHP, Apache / Nginx, and MySQL.
- For better performance, Varnish is tightly integrated. Varnish is an HTTP accelerator (reverse proxy) that sits infront of apache that caches requests and delivers them usually in less than 200ms.
- Redis can be used to store customer sessions and caching (faster than the file system).
- Memcached is also available for caching but Redis is the preferred method of caching. I found a good article here: https://www.infoworld.com/article/3063161/why-redis-beats-memcached-for-caching.html, if interested, but this is probably outside of this scope.
How are sessions handled?
- Default is stored on the file system. This can slow down response times.
- Memcached and Redis are also available.
Describe database sharding in magento.
• This feature is available in Magento Commerce only.
• Checkout, orders, and product data can all each use a separate master databases that you can optionally replicate.
• If you set up optional database replication, you get the following advantages:
• Data backup
• Data analysis without affecting the master database
• Scalability
What are limitations of database sharding in magento 2?
• Cannot write directly to the database (need to use the database interface instead, which is best practice anyway).
• Cannot use JOINs that affect the sales or quote databases.
• Use foreign keys to tables in the checkout sales or main databases.
• Should configure the split database solution before putting Magento into production. After is more difficult.
• You must separately / manually backup the other databases when using Magento’s DB backup (which is terrible).
• http://devdocs.magento.com/guides/v2.0/config-guide/multi-master/multi-master.html