dapr / php-sdk

Dapr SDK for PHP
Apache License 2.0
72 stars 15 forks source link

Support domain socket #116

Open daixiang0 opened 3 years ago

daixiang0 commented 3 years ago

Describe the proposal

Ref https://github.com/dapr/dapr/issues/2864

Release Note

RELEASE NOTE: ADD support domain socket.

withinboredom commented 2 years ago

I spent the day investigating the feasibility of it. It's a shame it isn't supported in Kubernetes yet! If it were, nginx-ingress could just fastcgi-proxy the request and an http server would be completely unnecessary for PHP projects. (nginx --> fastcgi --> php-fpm --> unix socket --> dapr). Right now a webserver must be run in front of PHP (caddy/apache/nginx) per pod to interface with Dapr.

Anyway ... to get this to work is actually pretty straightforward: https://github.com/guzzle/guzzle/issues/1962

This can be an option on the client builder, since it will be supported via grpc or http.