I have 6 web servers which are giving me problems due to cache inconsistency. I am thinking of building a cache invalidation service such that there is a topic on which all the servers can publish a message to invalidate an object. I am considering using the Amazon SNS for the making the topic.
Now for the servers to receive the invalidation messages, I am confused between the following:
For your use case, the http endpoints is the better solution. You push a message to SNS, and each of the subscribed endpoints will get called at a new api endpoint you host, that clears the cache.
SQS wouldn't be the best use-case here - in order to use it, you would need to have 6 separate queues (or one per server), and you would need to have an application on each that is always running in the background to check for new messages and 'pull' the message - the http endpoint is a 'push' operation, and that is what you want.