On receiving a request server check if key exist in cache or database say Redis or Dynamodb d. If key in new server process the keys, store result with key with ttl say 24 hours and returns response.