Replies: 1 comment
-
X is all about choice and giving you more options. If you use X behind a traditional web server, you can take advantage of normal request handling semantics like any other PHP project, so that If you use the powerful built-in web server, X gives you more control over request handling and potentially much better performance. You can use promises and fibers to execute controllers and may use a middleware handler to impose artificial limits if you want to, but X does not enforce this by default. The Which mode works better for your particular use case is up to you. We've seen a number of projects that employ either mode with great success, so we're not aware of any limitations beyond this. The server implementation is carefully crafted to not store any excessive buffers in memory, so this is known to work also under heavy load. If you feel there's anything that needs to be done here, we're happy to look into this. With great power comes great responsibility (sorry). |
Beta Was this translation helpful? Give feedback.
-
When using PHP-FPM, you get a few protections against unwieldly requests in the form of
memory_limit
andmax_execution_time
, so if a user is malicious (ex: sending a request that intentionally fills up memory) you at least know their request won't affect others users (besides making the server slower since they're using one of the processes).With framework-x, what protections are there against a Fiber getting out of control? As I understand it, Fibers scale dynamically and share a max memory limit with the parent PHP process. I don't know of a memory limit or max execution time per Fiber, although you could possibly do the latter with a
Fiber::suspend
.Thanks in advance for you time, this looks like a great project!
Beta Was this translation helpful? Give feedback.
All reactions