Request -> load balancer -> auto scaled pubsub writer -> pubsub -> client (write to BQ, ...)
If it doesn't have to be a post request, then you could just write into pubsub directly. Pubsub has a wide support of libraries [0] so you could do it from any language. Pubsub also scales well. We're sending in around 300k messages per sec and have very few problems with it.
[0] https://cloud.google.com/pubsub/docs/reference/libraries
I did think about doing something like transforming the POST in AWS Lambda (the emitter data is hosted there too) and transform into something I can ingest direct into pub/sub.
I can't control the emitting data. if I did it would be a much easier problem, each POST request contains very little data if there were multiple entries per single POST it would solve most of my problems, instead of sending 5k tiny JSON posts /sec lol
Request -> gae -> pubsub -> dataflow to bq template.
https://cloud.google.com/dataflow/docs/templates/provided-te...
We’re slowly transitioning to nats as we have a better control over what’s happening there. Also we had no issues with stability which I can’t say about pubsub
We're internally using pubsub (and nats) sending billions of messages every day. We don't use the push mode as Spotify [0] but pull from the queue instead which allows us to run on our pace.
We do write into bigquery (and citus) and each components is doing it on their own pace based on what they're capable of process at the moment.
[0] https://labs.spotify.com/2017/11/20/autoscaling-pub-sub-cons...