How push notification works for FCM/Apple push (APNs) in network level
Question : How push notification works for FCM/Apple push (APNs) in network level? There are so many articles describes the push notification work flow in application level. But how APN servers sends the notifications to clients in network level are not explained in many articles. The answer is long polling connections from client devices(Mobiles, Laptops) to APN servers. why long polling connection? if its short connections then it leads to notification delays based on polling interval. APN servers are configured with long keepalive timeout(usually this timeout is very short around 60 secs to 300 secs in normal application servers) so push notifications will deliver to client devices immediately through same long lived TCP connection once APN receives the notification from app server side why polling comes here? TCP connection always disconnects if there is no internet or network change or device restarts, etc,… In this case, client device always keep trying/polling to the AP