How to create an equivalent of a background thread for an auto-scaling instance
You can use a cron job that will start a task. In this task, you can call all your instances to clean up expired objects.
Been reading up a bit on background threads and it seems to only be allowed for backend instance. I have created an LRU instance cache that I want to call period cleanup jobs on to remove all expired objects. This will be used in both frontend and backend instances.
I thought about using deferred or taskqueue but those do not have the option to route a request back to the same instance. Any ideas?