This is sort of available now (https://cloudplatform.googleblog.com/2018/03/queue-based-scaling-made-easy-with-new-stackdriver-per-group-metrics.html), but seems to have the fatal flaw that instances can be terminated before they are done processing a message:
> Note that [num_undelivered_messages] exports the total number of messages in the queue, including messages that are currently being processed but that are not yet acknowledged. Using a metric that does not include the messages being processed is not recommended because such a metric can drop down to 0 when there is still work being done, which prompts autoscaling to scale down and possibly interrupt the actual work.
Thanks, we will look into this.
Interesting idea, we’ll consider it – thanks!
This is something we are planning to improve, hopefully later in the year.
A similar case of handling mutability in GCP is how you can change the template for an instance group. If you change the template, then any newly created machines will be updated, but existing machines will be unchanged. It seems like that same type of thing could be applied to instance templates.
Note that because instance templates can refer to an image family, you can essentially mutate an instance template by publishing a newer image to the family. Thus there is currently no guarantee that template instances are identical.
As mentioned, exporting the billing data is one way you can obtain whatever sorts/filters you want, but we’re considering your suggestion. Thx!Zach Bjornson shared this idea ·
Thanks, we are considering this request, it does come up from time to time. In the meantime, https://cloud.google.com/solutions/filers-on-compute-engine provides several options that may be useful for setting up a file server on GCE, depending on your needs.