3 ms·
Pub Sub is the same quota hits (or +1 /connection). I could use pub sub but I still have to accept the incoming POST before publishing a message.
by dillondoyle 9y ago
Pub Sub is the same quota hits (or +1 /connection). I could use pub sub but I still have to accept the incoming POST before publishing a message.
- dillondoyle 9y agoTo be clearer it's same quota problem using cloud functions. Moving to something without the same quota/scale problems like Compute Engine or just DIY containers might make sense but then I'm back to a complicated system (Snowplow) that we have in AWS that's too complicated for me alone
- doh 9y agoUnderstood. 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...