AWS SNS Not sending notifications every time

1

Hello AWS community,

We are using SNS push notification service for iOS. We are sending push notifications for a live game score update to users who have subscribed for that match. For example if 100 users have subscribed for live score of a game then we are sending notification every 10 seconds to 100 devices. We are logging these events to Amazon cloud watch for monitoring. We are facing an issue that after few minutes of game, cloud watch is not showing logs for every 10 seconds. Some times it shows 1 or 2 notifications only per minute. That means frequency of sending push notification is not stable as 10 seconds. Also it is not sending to all 100 devices. Sometimes it is sending 80 devices, some times it is sending 50-60 devices like that.

So overall two issues:

  1. Frequency for sending notification gets slower as time passes after game is started.
  2. Not every time it is sending to all subscribers (100 devices as an example). It is only sending to random few devices.

Let us know if any one has faced similar issue.

Thanks, Jhavtech Studios.

2개 답변
0

It appears that you're encountering issues related to throttling and potentially unstable delivery of push notifications. Here are some steps to help diagnose and resolve the issues:

  1. Inspect CloudWatch Metrics: First, review the CloudWatch metrics for your SNS topic to check for any throttling or delivery failures. You can do this by navigating to the CloudWatch console and selecting "Metrics," then choosing the "SNS" namespace. Look for the NumberOfMessagesPublished, NumberOfNotificationsDelivered, NumberOfNotificationsFailed, and PublishSize metrics.

  2. Review SNS retry policies: SNS has a default retry policy for message delivery. In case of delivery failures, SNS will retry sending the message according to the policy. However, if the failure persists, the message might not be delivered to all subscribers. Review the retry policy for your topic and make adjustments if necessary: https://docs.aws.amazon.com/sns/latest/dg/sns-message-delivery-retries.html

  3. Check the message size: The payload size limit for SNS push notifications is 256KB for iOS. If the payload exceeds this limit, the notification will be rejected. Ensure that your message size is within the limit.

  4. Rate limiting: If you're sending a high volume of notifications in a short period, you might hit rate limits on the SNS or APNs side. Ensure that you're adhering to the rate limits imposed by both services. You can also consider implementing a backoff strategy to prevent hitting these limits.

Jorge
답변함 일 년 전
0

I am facing this same issue using SNS for iOS Live Activities.

Did you ever find a solution for this problem?

I am considering moving away from SNS if it is not a reliable way to deliver Apple Push notifications.

답변함 10달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠