-
I'm running several php-fpm servers for balancing purposes. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
Interesting question @p5ych0 and not one I've thought of before now. Off the top of my head, you could use the Of course, that has a bunch of issue to resolve such as what if there are different directives? How would you know what server the results came from? How would you invalidate anything in the cache (because you'd need to know which server)? ... and so on. I think a lot of that could probably be resolved by also including an id or url of the server you've got those results from and then putting that into the results. Combine anything that is the same across all servers (like functions or possibly directives), but for the file list have a list built up of on which servers that file is found. Then you could work out something in the frontend to invalidate and filter based on the server values(which would require extra endpoints on the web services to do such things). I think it'll require a bit of a rejig of things, but doesn't feel like it'd be too much or a re-write. |
Beta Was this translation helpful? Give feedback.
-
I think drop-down selection of a single server to check would be sufficient |
Beta Was this translation helpful? Give feedback.
-
Yeah, that would work, too. I was going for a more integrated approach, I guess, but it's your setup so do what best works for you. 😄 |
Beta Was this translation helpful? Give feedback.
Interesting question @p5ych0 and not one I've thought of before now. Off the top of my head, you could use the
Amnuts\Opcache\Service
class with an endpoint over the top of it which has an endpoint that returns the contents of thecompileState
method call. You'd then have to change the main GUI script so that instead of using $opcache = (new Service($options))->handle();` you'd go to each of your services, get the results and amalgamate them for output.Of course, that has a bunch of issue to resolve such as what if there are different directives? How would you know what server the results came from? How would you invalidate anything in the cache (because you'd need to know which server)?…