I recently interviewed for a Research Scientist role at Apple, on a team that works on battery power. Here's the question they asked.
The team's core mission is optimizing iPhone battery life and power usage. They found that when users are on Apple Music, they often hit network fluctuations where the app can't get the audio data.
At that point the system faces a choice:
The disconnect could be a false negative — a lot of the time the network just glitched for a moment, and a retry would reconnect fine.
Or the network could really be down for good — and if it's actually gone but the system keeps retrying anyway, that burns a lot of battery, because every retry means firing off another network request.
So you can't just retry forever. You need to find an optimal number of retries (a threshold), and once you hit it, you give up.
The data they gave me had just two columns: number of retries, and whether the connection eventually succeeded (Is Success).
I didn't answer it well. I just said to look at the data distribution, find some percentiles, and use that to decide the threshold.
Discussion
Loading comments…