KKeySync
← Back to quests
Quest · quest 13Johto · Advanced

Healing Party (Batch Operations)

You arrive at the Pokémon Center to load your party. Instead of making separate reads, use BatchGetItem—while handling the partial responses a production system can return.

BatchGetItemUnprocessedKeysBackoff

Key takeaways

  • Batch operations process multiple items in a single network request.
  • BatchGetItem can read up to 100 items at once.
  • Responses are unordered and may contain UnprocessedKeys that must be retried.

Healing the Party (BatchGetItem)

By passing an array of keys to BatchGetItem, we reduce network round trips. A successful HTTP response can still be partial, so merge responses by key and retry UnprocessedKeys with exponential backoff and jitter.

BatchGetItemjavascript

Interactive Challenge

Load the party efficiently. Finish the Keys array and keep retrying UnprocessedKeys, because batch responses can be partial and their item order is not guaranteed.

Goal: Add Cyndaquil and Totodile, then loop overresponse.UnprocessedKeys. Production retries use exponential backoff with jitter.

Quick Quiz

What is the maximum number of items you can retrieve in a single BatchGetItem request?

Make your choice to test your understanding. Submit to check, and if it's not quite right you can adjust and try again.