After digging further, it seems the correct answer would be to use *services*, which I knew was a thing, but was always using only the default service. So different services of the same project would share the datastore, and yet each have its own versions and instances. And Cloud Tasks routing allows for targeting a given service.
However, if anyone has other thoughts on the matter, they will be welcome. On Friday, 5 February 2021 at 13:23:58 UTC+1 Patrice Bertrand wrote: > > I'm looking for advice regarding the best way to dedicate App Engine > instances for running certain deferred tasks. > > We want to be sure that deferred tasks, as well as cron tasks, can never > penalize the processing of actual client requests. > > One way to do this would be to have a separate GAE project, dedicated to > running these tasks, and use the Cloud Tasks api ( > https://cloud.google.com/tasks/docs/creating-appengine-tasks) and create > tasks with a specific target project. But this second 'batch' GAE project > would need to have read/write access to the Ndb datastore of the first > project, which does not seem to be possible. > > Another way, which seems easier, would be to use a specific version of the > same project, which would be dedicated to the handling of these batch > tasks. Thus when we deploy version v103 of the project, we would also > deploy v103-batch, and then when queuing tasks we would specify that the > target version is v103-batch. This would avoid the need of sharing > Datastore between two projects. This technique was suggested in an SO > post by Guido Von Rossum ( > https://stackoverflow.com/questions/12074754/google-app-engine-app-interoperability), > > but that was back in 2012, things may have changed since then. > > Thank you for your inputs. > -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To unsubscribe from this group and stop receiving emails from it, send an email to google-appengine+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine/eec3282e-8073-4472-b0f4-58bf822691fan%40googlegroups.com.