Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better PHP support (php-fpm) #1395

Open
grcevski opened this issue Nov 22, 2024 · 0 comments
Open

Better PHP support (php-fpm) #1395

grcevski opened this issue Nov 22, 2024 · 0 comments

Comments

@grcevski
Copy link
Contributor

One common framework that has gained popularity in the PHP world is php-fpm. It's a lot more efficient way to serve PHP workloads than the traditional embedding of the PHP modules in the web server. The communication happens through a TCP protocol which isn't HTTP, but a binary form, made to be more efficient. The RFC spec can be found here https://fastcgi-archives.github.io/FastCGI_Specification.html.

The architecture of how this is typically setup is like this:

Image

I took a peek of what this looks under the covers and after some initial binary data, at least the request part looks pretty easy to parse, e.g. it's very similar to how we handle SQL in a generic way:

<some binary>
QUERY_STRING
REQUEST_METHOD GET <-- method
CONTENT_TYPE
CONTENT_LENGTH
SCRIPT_NAME /index.php <-- URL
REQUEST_URI /index.php <-- URL 

One other wrinkle here is that folks typically set this up with Unix sockets rather than network sockets. We need to check what (if anything) we need to do to ensure we support Unix sockets in Beyla.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant