1

I have a question regarding phpfastcache that i hope someone can answer and explain to me. phpfastcache claim that it can serv 10,000+ visitors, but what is the limit it can serv if there is any? let me give you a example so you can answer me based on it.

  • Let say my website or app have 12 million online users ( just example ) and i have to send the same query to the database on every page/app load. Do you think it will be able to handle this amount of users? we are using a nosql database and our website is linked to a cdn. We know that memory is always faster than file system, but we are using file system when we are using phpfastcache for cache. I hope there is someone who can answer my question and explain things to me to future use.
user1341993
  • 253
  • 2
  • 5
  • 14

1 Answers1

1

It doesn't claim that it can serve 10.000 requests! It suggests that it's a great fit if you have 10.000 identical requests to the database. To get real numbers you have to profile your server.

As it's probably an Apache based one it will depend on the number of concurrent connections Apache can handle.

What the guys from phpfastcache mean is that if you have a page that's constantly hit and your page performs the same query over and over again their software is a great fit to that problem.

Frankie
  • 24,627
  • 10
  • 79
  • 121
  • So you are telling me that if our Apache can scale to handle the traffic of users to our website we dont have to think about phpfastcache limit, becouse phpfastcache dont have any connection limits? – user1341993 Sep 08 '15 at 13:14
  • I was trying to understand if my website have 12000,000 visitors who are online, and my dynamic page have to send 12000,000 same queries to database on every page load i was not sure if phpFastCache will be able to only send 1 query to DB, and use the cache to serve 11999,999 other visitors. – user1341993 Sep 08 '15 at 13:20
  • Phpfastcache is a php module. If you're running php as an Apache module it will be interpreted and run along with the rest of your code. So yes, Apache will be the limit. It will then try to connect to redis, or whatever you set up as the storage layer that will surely be orders of magnitude more scalable that the amount of simultaneous Apache connections your server would be able to handle. – Frankie Sep 08 '15 at 13:20
  • That is correct. But you won't have an Apache server able to serve 1.2M simultaneous connections. You'll have to scale horizontally. Luckily phpfastcache will allow you to use a multitude of servers. – Frankie Sep 08 '15 at 13:23
  • Using cdn something like cloudflare would solve the Apache limit? or can we use memcached inside Phpfastcache to solve it? or both – user1341993 Sep 08 '15 at 13:23
  • It's irrealistic to think that a single server will be able to handle 1.2M simultaneous connections. Cloudflare will ease up the workload by serving and caching static resources. All resources that deal with the database and, thus, will benefit from phpfastcache will probably not be cached. – Frankie Sep 09 '15 at 10:07
  • so we need to use load balance system with backend servers that we can put more and more of to allow user to connect, right? – user1341993 Sep 10 '15 at 13:12
  • @user1341993 that's correct but the spirit of SO (stack overflow) states that you should ask a single and precise question. We're loosing that ground very fast here as your original question was about phpfastcache. The ideal scenario is to ask a question, upvote and or accept the answer is you believe it to be correct and then, if you still have doubts, ask them as new questions. – Frankie Sep 11 '15 at 11:42
  • Thanks a lot for your help :) – user1341993 Sep 11 '15 at 11:49