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

[docs] add resume_gateway_url documentation #5282

Merged
merged 4 commits into from
Aug 9, 2022

Conversation

daisyzhou
Copy link
Contributor

@daisyzhou daisyzhou commented Aug 4, 2022

For now resume_gateway_url is still always "wss://gateway.discord.gg/" but in a few weeks we'll start sending different values for resume_gateway_url

"wss://gateway.discord.gg/" will continue to work but may force a faster reconnect starting in a couple months

@daisyzhou daisyzhou requested a review from devsnek August 4, 2022 23:45
Co-authored-by: Florian Spieß <business@minnced.club>
docs/topics/Gateway.md Outdated Show resolved Hide resolved
docs/topics/Gateway.md Outdated Show resolved Hide resolved
@splatterxl
Copy link
Contributor

Out of curiosity, what will the property return in the future?

@MinnDevelopment
Copy link
Contributor

Will there be new error scenarios we need to prepare for if the resume URL is invalidated?

daisyzhou and others added 2 commits August 4, 2022 17:49
Co-authored-by: snek <me@gus.host>
Co-authored-by: snek <me@gus.host>
@daisyzhou
Copy link
Contributor Author

daisyzhou commented Aug 5, 2022

we'll make an actual announcement in the ddevs server in a few days to ask people to make this change and share timelines! we aim to give you plenty of time to do it.

Out of curiosity, what will the property return in the future?

This is to prepare for some internal changes related to availability zones, in the future there will probably be a set of resume urls that point to different zones and we ask that you reconnect to the one that you get in the ready payload

Will there be new error scenarios we need to prepare for if the resume URL is invalidated?

If you're trying to resume a session ID we ask you use the resume URL we provided along with the session ID in the ready payload. After some adjustment period to let people update their code, if you're still using the one you use for new sessions ("wss://gateway.discord.gg/"), the resume will still succeed but you can expect to be booted off and forced to resume again sooner than you otherwise would be.

@Zoddo
Copy link
Contributor

Zoddo commented Aug 5, 2022

I think an entry should be added to the changelog :)

@Zoddo
Copy link
Contributor

Zoddo commented Aug 5, 2022

Quick question: if the resume fails (the gateway responds with OP9 Invalid Session), can we send an IDENTIFY directly to the "resume gateway"? Or are we expected to disconnect from the "resume gateway", and reconnect to wss://gateway.discord.gg/ to start a new session?

@davfsa
Copy link
Contributor

davfsa commented Aug 9, 2022

Quick question: if the resume fails (the gateway responds with OP9 Invalid Session), can we send an IDENTIFY directly to the "resume gateway"? Or are we expected to disconnect from the "resume gateway", and reconnect to wss://gateway.discord.gg/ to start a new session?

@daisyzhou would it be possible to get an answer on this?

@DV8FromTheWorld
Copy link
Member

DV8FromTheWorld commented Aug 9, 2022

Quick question: if the resume fails (the gateway responds with OP9 Invalid Session), can we send an IDENTIFY directly to the "resume gateway"? Or are we expected to disconnect from the "resume gateway", and reconnect to wss://gateway.discord.gg/ to start a new session?

Whatever the answer to this is, we should explicitly detail it in the docs.

@daisyzhou
Copy link
Contributor Author

Quick question: if the resume fails (the gateway responds with OP9 Invalid Session), can we send an IDENTIFY directly to the "resume gateway"? Or are we expected to disconnect from the "resume gateway", and reconnect to wss://gateway.discord.gg/ to start a new session?

@daisyzhou would it be possible to get an answer on this?

oh, good question. If the resume fails, please reconnect to the main gateway entry point (in theory whatever you have cached from the Get Gateway or Get Gateway Bot endpoints https://discord.com/developers/docs/topics/gateway#get-gateway, or wss://gateway.discord.gg)

I'll add this to the docs

@daisyzhou
Copy link
Contributor Author

Quick question: if the resume fails (the gateway responds with OP9 Invalid Session), can we send an IDENTIFY directly to the "resume gateway"? Or are we expected to disconnect from the "resume gateway", and reconnect to wss://gateway.discord.gg/ to start a new session?

@daisyzhou would it be possible to get an answer on this?

oh, good question. If the resume fails, please reconnect to the main gateway entry point (in theory whatever you have cached from the Get Gateway or Get Gateway Bot endpoints https://discord.com/developers/docs/topics/gateway#get-gateway, or wss://gateway.discord.gg)

I'll add this to the docs

please hold -- we might change this, sorry for the churn

@ooliver1
Copy link

ooliver1 commented Aug 18, 2022

Quick question: if the resume fails (the gateway responds with OP9 Invalid Session), can we send an IDENTIFY directly to the "resume gateway"? Or are we expected to disconnect from the "resume gateway", and reconnect to wss://gateway.discord.gg/ to start a new session?

@daisyzhou would it be possible to get an answer on this?

oh, good question. If the resume fails, please reconnect to the main gateway entry point (in theory whatever you have cached from the Get Gateway or Get Gateway Bot endpoints https://discord.com/developers/docs/topics/gateway#get-gateway, or wss://gateway.discord.gg)
I'll add this to the docs

please hold -- we might change this, sorry for the churn

Is there any timeline for this "subject to change" addition that is coming in mid September and has already been announced? Would rather get this in to libraries earlier instead of sitting on the edge of my seat, waiting to see if there may be a change.

@jhgg
Copy link
Member

jhgg commented Aug 18, 2022

I would just like to state, so people don't get confused. This is an optional change that we prefer people implement. But if you do not, the worst that will happen is we will just disconnect your web-socket a bit more often, in hopes that your reconnect will land you to the right destination.

So, the worst case is "you have to resume a bit more often as we bump you around until your connection lands on the right zone."

@ooliver1
Copy link

I would just like to state, so people don't get confused. This is an optional change that we prefer people implement. But if you do not, the worst that will happen is we will just disconnect your web-socket a bit more often, in hopes that your reconnect will land you to the right destination.

So, the worst case is "you have to resume a bit more often as we bump you around until your connection lands on the right zone."

Which, is of course not preferred.

@onerandomusername
Copy link
Contributor

please hold -- we might change this, sorry for the churn

@daisyzhou how long do we need to keep holding, has a verdict been reached yet?

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

Successfully merging this pull request may close these issues.

None yet