Browse Source

Disable iOS polling entirely

binwiederhier 2 năm trước cách đây
mục cha
commit
bdae48afba
2 tập tin đã thay đổi với 19 bổ sung2 xóa
  1. 11 0
      docs/releases.md
  2. 8 2
      server/server.go

+ 11 - 0
docs/releases.md

@@ -1151,3 +1151,14 @@ and the [ntfy Android app](https://github.com/binwiederhier/ntfy-android/release
 **Additional languages:**
 **Additional languages:**
 
 
 * Swedish (thanks to [@hellbown](https://hosted.weblate.org/user/hellbown/))
 * Swedish (thanks to [@hellbown](https://hosted.weblate.org/user/hellbown/))
+
+## ntfy server v2.3.1
+
+This release disables server-initiated polling of iOS devices entirely, thereby eliminating the thundering herd problem
+on ntfy.sh that we observe every 20 minutes. The polling was never strictly necessary, and has actually caused duplicate
+delivery issues as well, so disabling it should not have any negative effects. iOS users, please reach out via Discord
+or Matrix if there are issues.
+
+**Bug fixes + maintenance:**
+
+* Disable iOS polling entirely ([#677](https://github.com/binwiederhier/ntfy/issues/677))

+ 8 - 2
server/server.go

@@ -1529,8 +1529,14 @@ func (s *Server) runFirebaseKeepaliver() {
 		select {
 		select {
 		case <-time.After(s.config.FirebaseKeepaliveInterval):
 		case <-time.After(s.config.FirebaseKeepaliveInterval):
 			s.sendToFirebase(v, newKeepaliveMessage(firebaseControlTopic))
 			s.sendToFirebase(v, newKeepaliveMessage(firebaseControlTopic))
-		case <-time.After(s.config.FirebasePollInterval):
-			s.sendToFirebase(v, newKeepaliveMessage(firebasePollTopic))
+		/*
+			FIXME: Disable iOS polling entirely for now due to thundering herd problem (see #677)
+			       To solve this, we'd have to shard the iOS poll topics to spread out the polling evenly.
+			       Given that it's not really necessary to poll, turning it off for now should not have any impact.
+
+			case <-time.After(s.config.FirebasePollInterval):
+				s.sendToFirebase(v, newKeepaliveMessage(firebasePollTopic))
+		*/
 		case <-s.closeChan:
 		case <-s.closeChan:
 			return
 			return
 		}
 		}