4 ms·
Understood. I think there is a bit simpler setup that you could utilize, but it does require a custom deployment on GCE. Request -> load balancer -> auto scale
by doh 9y ago
Understood. I think there is a bit simpler setup that you could utilize, but it does require a custom deployment on GCE.
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 https://cloud.google.com/pubsub/docs/reference/libraries
- dillondoyle 9y agoYup that's pretty much where I'm going although without pub/sub ideally. it's marketing analytics so if a few inserts fail it doesn't matter. But might not be able to get the 0 -> 1000s instant working without Google's abstraction messaging in front (similar setup on AWS w. kinesis but it's too complicated for me) 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
- cobookman 9y agoYou can make it simpler. Request -> gae -> pubsub -> dataflow to bq template. https://cloud.google.com/dataflow/docs/templates/provided-templates https://cloud.google.com/dataflow/docs/templates/provided-te...