-
Notifications
You must be signed in to change notification settings - Fork 362
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
Max connection, concurrent requests #515
Comments
Nice question! I have the same doubt here, can anyone help? |
@guilherme-v I have some new experience with |
I don't think we do anything in this package to hold connections. The
Tracked at #424 I'm going to close this issue since it relates to the SDK and not this package, and the aborting API is tracked in #424. |
I have some question that asked before in stack overflow without good responses, May be it's a feature request I'm not sure, Please help me
I have an instance of Client in my application, it is the only client that I send request to the server, Today I see that there is a
client.close()
method, If you call it , you cannot send request anymore.I want to know :
1. How many connections can be created by a Client in flutter
In the official document we have
So I think
Client
create a connection and do it best to keep it alive, I think If the server cannot support persistent connections or close the connection, TheClient
will create another connection on the next request, Right?Also I think there is no connection pooling and If I want to have 2 connection simultaneously I must create 2 Client instace
What happens if we have multiple host, for instance
s1.example.com
,s2.example.com
,another.com:8080
2. What will happen if I have a global Client and we lose connection, i.e: disconnecting from the internet
I think as we have persistent connections for short network issue, the connection is not lost, but for long issues or OS detection it will lost but for the next request client will create another connection
3. How many concurrent requests can be sent by a Client?
As I think a client has only a persisted connection (I'm not sure about multiple hostname, May be a persisted connection per hostname) , It queue request and we cannot have concurrent requests
4. Is using a global Client a bad idea?
What happened if I never call
client.close()
, and use an instance ofClient
globally, I think downloading and uploading large files will block subsequent requestsThe text was updated successfully, but these errors were encountered: