When using Amplitude’s mobile SDKs, customers can customize which ingestion endpoint they want to set. However, the ingestion endpoint can’t be changed once the mobile applications are released, which can introduce some challenges if that endpoint becomes unavailable.
To account for this, Amplitude’s SDK team is working hard to make our SDKs robust and flexible. We’re happy to introduce a new feature for mobile SDKs—Dynamic Configuration. This feature allows our SDK to dynamically fetch the best ingestion endpoint, based on server availability as well as each device’s geolocation.
On May 3, 2020, the certificate of api.amplitude.com became invalid because its root certificate expired on May 30, 2020. In response, we rolled out api2.amplitude.com with a valid certificate, and our customers were able to change the URL from the JS SDK in their web applications. However, this solution didn’t apply to mobile apps, and users with old apps weren’t able to submit data until we re-validated api.amplitude.com again.
Other situations where dynamic configuration can be useful include DNS outages, DNS poisoning, and potentially ameliorating slower connections to our US server for end-users with poorer connectivity.
Let’s talk about two common scenarios where Dynamic Configuration is most likely to be helpful:
Scenario 1. In some regions, api.amplitude.com may become inaccessible, so the dynamic config server will return a different endpoint that works for that region. Also potentially in the future, the endpoint could be in a region closer to the device, and therefore deliver faster speeds.
Scenario 2. When a DNS/certificate outage happens, Amplitude can change the response of the dynamic config server to return a new endpoint, which should fix the issue when the user re-opens the app. It will help reduce the risk data loss, and eliminate the need to ask customers to take actions on their end.
This feature is available now in our iOS and Android SDKs (iOS - v5.3.0, Android - v2.28.0). To turn on Dynamic Configuration, read the documentation here. We will continue to find other ways we can make our SDKs more robust with dynamic configuration, and are also considering adding this feature to other SDKs.