Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit f755338

Browse filesBrowse files
Add note for high volume push requests (GoogleCloudPlatform#2366)
* Add note for best practices for high volume push requests
1 parent c96596a commit f755338
Copy full SHA for f755338

File tree

Expand file treeCollapse file tree

1 file changed

+6
-0
lines changed
Filter options
  • appengine/standard_python37/pubsub
Expand file treeCollapse file tree

1 file changed

+6
-0
lines changed

‎appengine/standard_python37/pubsub/main.py

Copy file name to clipboardExpand all lines: appengine/standard_python37/pubsub/main.py
+6Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,12 @@ def receive_messages_handler():
7676

7777
# Verify and decode the JWT. `verify_oauth2_token` verifies
7878
# the JWT signature, the `aud` claim, and the `exp` claim.
79+
# Note: For high volume push requests, it would save some network
80+
# overhead if you verify the tokens offline by downloading Google's
81+
# Public Cert and decode them using the `google.auth.jwt` module;
82+
# caching already seen tokens works best when a large volume of
83+
# messages have prompted a single push server to handle them, in which
84+
# case they would all share the same token for a limited time window.
7985
claim = id_token.verify_oauth2_token(token, requests.Request(),
8086
audience='example.com')
8187
# Must also verify the `iss` claim.

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.