'Keeping iOS widget up to date with remote data

I am implementing an iOS widget and trying to determine the refresh schedule. I read Apple's documentation for Keeping a Widget Up to Date and saw this tip:

Important

Plan ahead if your widget makes requests to a server when it reloads, and uses afterDate() with a specific date in timeline entries. WidgetKit tries to respect the date you specify, which may cause a significant increase in server load when multiple devices reload your widget at around the same time.

It's a good tip but doesn't offer any suggestions for how to prevent this scenario. If I need to refresh the data from the remote server once a day at midnight (or any arbitrary time) what would be best practice here to avoid overloading the server?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source