News for hackers. Stuff that matters.
Re:Handling server load for the Raspberry Pi Zero launch by mfjordvald on Saturday November 28, 2015 @10:32AM (#10641294)
APCu would not be enough at this level. Simply invoking PHP itself is enough to kill servers here. But yes, using nginx or vanish would have probably been easier and there's plenty of resources on it. In a case at my last job a single nginx instance handled 24k concurrent connections just fine.
Re:Handling server load for the Raspberry Pi Zero launch by toast0 on Saturday November 28, 2015 @10:49AM (#10641344)
PHP can easily handle thousands of requests per second, as long as each request doesn't do much. Fetching from a shared memory cache counts as not doing much. You would need to do before you initialize WordPress though.
Re:Handling server load for the Raspberry Pi Zero launch by tyingq on Saturday November 28, 2015 @11:15AM (#10641428)
Right, the idea would be to put the logic at the top of the main php file for wordpress, something like:

  # oversimplified, but...
  $key=md5(http_build_query($_GET));
  $content=apc_fetch($key,$success);
  if ($success === TRUE) {
      echo $content;
      return ;# never invoke wordpress
  }
  # wordpress here
  # some logic at the bottom to store what wordpress
  #   just rendered into the cache