News for hackers. Stuff that matters.
Re:Azure Functions – Significant Improvements in HTTP Trigge... by doh on Friday March 09, 2018 @08:01PM (#16556470)
I don't know your flow, but how about using a queue system to prevent the bursts of data?

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...

Re:Azure Functions – Significant Improvements in HTTP Trigge... by dillondoyle on Friday March 09, 2018 @09:34PM (#16556779)
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.
Re:Azure Functions – Significant Improvements in HTTP Trigge... by dillondoyle on Friday March 09, 2018 @09:36PM (#16556788)
To 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
Re:Azure Functions – Significant Improvements in HTTP Trigge... by doh on Friday March 09, 2018 @09:46PM (#16556825)
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

Re:Azure Functions – Significant Improvements in HTTP Trigge... by dillondoyle on Saturday March 10, 2018 @01:07AM (#16557352)
Yup 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

Re:Azure Functions – Significant Improvements in HTTP Trigge... by cobookman on Saturday March 10, 2018 @12:13AM (#16557204)
You can make it simpler.

Request -> gae -> pubsub -> dataflow to bq template.

https://cloud.google.com/dataflow/docs/templates/provided-te...

Re:Azure Functions – Significant Improvements in HTTP Trigge... by bruth on Friday March 09, 2018 @08:50PM (#16556650)
What workloads do you prefer pubsub over nats and vice versa?
Re:Azure Functions – Significant Improvements in HTTP Trigge... by doh on Friday March 09, 2018 @09:25PM (#16556751)
We use nats mostly for synchronous tasks (where the response has to be returned to the exact client initializing the request) and pubsub for everything else.

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