Reputation: 4207
This is a question of my curiosity regarding the internal architecture of SQS. I did not seem to find an in-depth intro to its architectural design.
From this basic architecture doc, I learned that each message is redundantly stored in multiple SQS servers.
I was wondering how does SQS compute what set of SQS servers should be used to store a given message? Does it just randomly choose a set of servers and then maintain the message_id —> server_list mappings in an index server? Or, maybe the SQS servers are divided into multiple redundant groups, and then SQS computes the hash of each message and then compute the server “index” in each group?
Upvotes: 1
Views: 107
Reputation: 6870
SQS doesn't provide an API to access a message by ID. So there is no need to map it to a specific server instance given an ID which makes both of your guesses incorrect.
Upvotes: 1