algorithm - How is Amazon SQS visibility timeout implemented? -
i wondering how efficient implementation of sqs visibility timeout looks like. messages put in queue , worker sweeps on , removes reached timeout threshold?
i implement storing timestamp
says when make visible.
- during
receivemessage()
, not return messagestimestamp < now
- in management console, show
timestamp < now
messages in flight - when
timestamp >= now
, nothing!
while there lot of timestamp comparisons, no worse checking status code. plus, there's no need clear timestamp when time has past, "efficient" in no 'sweep' processes required.
amazon sqs highly distributed across multiple servers , multiple availability zones, efficient avoid possible data update since need replicated amongst servers.
Comments
Post a Comment