-
Notifications
You must be signed in to change notification settings - Fork 53
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
MultiHttpClient #9
Comments
I don't think we can use BatchResponse in this case, as Responses are indexed by request, which is only one in this case. You either have to clone the requests or create a response object which indexes responses by client. |
Good point, we will need to map the response with the httpclient in this case IMO. |
in FriendsOfSymfony/FOSHttpCacheBundle#283 we found that we should be able to use the it would be great if the multiplexer could handle this situation. any idea how we could achieve this in a generic way? or can / should we somehow pass information down to the actual implementation? |
Maybe your Capability idea could work here. Pair a client with a (set of) RequestMatcher and send the request with the matching client. |
but that only delegates the problem to the matching client. we need to send the same request to various IPs, and we found that if HTTPS is used, the certificate will be for the |
in FOSHttpCache, this is what we currently do: https://github.com/FriendsOfSymfony/FOSHttpCache/blob/master/src/ProxyClient/HttpDispatcher.php#L188 its a very specific scenario, however. and i think all scenarios that require sending a request to multiple hosts are very specific. you also would need to change the requests one way or another in each client, to make this actually do anything. therefore i am not sure if we should provide something here. |
Having a client that accept multi http clients, when it receives a request it will duplicate the call to all the underlying client and return a BatchResponse (like the batchclient)
It should done the call in async mode if possible or in sync mode if no async is available.
One of the use case can be for FosHttpCache when we need to send a request over multiple varnish instance.
The text was updated successfully, but these errors were encountered: