We are running many websites in Yii2 application. Currently we are using File Cache for Data Caching. Now we want to use load balancer and put our caching on dedicated server.
We will have to store approx 100GB of cached data.
What we have tried?
File Cache: Working great currently. But We can not move it to seperate dedicated server.
Redis Cache: We created a dedicated server for Redis. Since we are on low budget therefore instead of using 100GB RAM server we used 2Core CPU and 4GB RAM server and created Swap space of 110GB. for storing cached data. It worked great but after sometime there was a sudden spike in CPU usage to 100% and Redis crashed. This was started happening daily. I was unable to find the exact reason.
Now I have two more options, using MongoDB as Cache server or Separate MySql Server for storing cached data.
My question is to experienced developers is that if I use MongoDB or MySql as Cache Server will I get at least File Cache like performance? Currently I am ok with File Cache Performance, I only want to move my cache to separate server.