-
Notifications
You must be signed in to change notification settings - Fork 609
Stateless StreamableHTTPServerTransport is still stateful? #360
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
Comments
I think it is not, even in a fully stateless mode, the |
Yeah, the current example of stateless server doesn't work |
I think for a stateless server, it shouldn't be mandatory to require initialization. |
Related #335 |
@cramforce thank you for creating this issue! yes, the example is wrong, fixed it. note, please use the latest release (1.10.1) |
@wong2 the initialization is required for capabilities negotiations regardless if it's a stateful or a stateless server |
@ihrpr QQ: if there are multiple replicas, and your client initializes with the first replica but its second request is load balanced to the second replica (which still didn't initialize) what is the expected result? (The actual result is that it fails) How is this stateless or how can statelessness be achieved with this protocol? Note: The documented approach Stateless Mode doesn't work. And you can easily run the same server twice, and put a load balancer in front with a round robin algorithm, and you will see that it won't work. |
Another duplicated issue: #330 |
I think the problem is that the Server itself IS stateful, which stores attributes like |
Yeah, with the .1 and updated example it works with a single server replica. I'd even say that with multiple replicas it appears now all replicas eventually get into good state but requests fail if a replica has never seen an initialization request. I think a cleaner design which would force things to work in both simple and complex examples would be where the stateless server/transport gets constructed per request (and garbage collected). That way it is absolutely clear that it is truly stateless |
@cramforce #335 should address init state failure on the server. |
Hey,
I'm probably missing something, but it appears that
StreamableHTTPServerTransport._initialized
represents inter-request state as shown hereI need to hit the same transport between the initial GET and subsequent POST
Meanwhile the sample code makes a new
transport
object on every request which yields "not yet initialized" errorsAre fully stateless server transports supported?
The text was updated successfully, but these errors were encountered: