Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
chasers
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
7 ms
·
31.
▲
by
chasers
3y ago
I assumed it did because I would think Postgres caches the query plan by some statement hash not just by name. Anyways, I'm probably wrong here but it looks like I'm about to figure this out now :D
32.
▲
by
chasers
3y ago
It is very BEAMy because we love the BEAM. All connections are supervised :D Might be a little too close to "supervisor" though. > To what extent are these metrics distorted by use of a Supavisor connection pooler? How could Su
33.
▲
by
chasers
3y ago
Thanks!
34.
▲
by
chasers
3y ago
You could bring it in as an application but you already get pooling with Ecto via Postgrex and DBConnection. If you're using Elixir there's really no need for separate connection pool until you have LOTS of nodes.
35.
▲
by
chasers
3y ago
Yeah what you're looking for is "unnamed prepared statements". If your client supports this then you can use PgBouncer and get the throughput benefits. Maybe binary_parameters is a different thing. Need to look into it more b
36.
▲
by
chasers
3y ago
Unknown at the moment but we're definitely open to some prior art if there's an implementation you appreciate. Naively, POSTing a query string and params would go a long ways I think.
37.
▲
by
chasers
3y ago
Can your client use the `binary_parameters` param? e.g. https://blog.bullgare.com/2019/06/pgbouncer-and-prepared-sta... Elixir's Ecto can (and that Go example) so if you use Elixir (or Go) you can use prepare
38.
▲
by
chasers
3y ago
We discussed this. Don't remember exactly but @abc3erl had a lot of experience with poolboy. We made sure to do local benchmarks along the way and there wasn't a meaningful difference. Really the discussion was around doing as lit
39.
▲
by
chasers
3y ago
Ha! Wait but why Google Cloud SQL proxy too? If you are interested in connecting over this it would be great to connect… chase@supabase.com. We want to do load balancing too. Makes so much sense to do load balancing in the proxy.
40.
▲
by
chasers
3y ago
Nice! Yeah really our first go at it so I’m sure we have room to improve. PgBouncer was on the same instance I’m assuming?
41.
▲
by
chasers
3y ago
Binary pattern matching is great for working with protocols. Erlang process monitoring makes it very easy to handle client disconnects. And Elixir makes using Erlang a bit more approachable.
42.
▲
by
chasers
3y ago
Contributor here. Happy to answer any questions. An interesting bit... the syn library helps us guarantee there is only one connection pool alive on the cluster at a time and gives us callbacks to resolve the conflict if two get spun up. h
43.
▲
by
chasers
4y ago
Pattern matching and structs get you 90% of the way there imo. And Elixir started emitting warnings if you try to access a field in a struct and it doesn't exist.
44.
▲
by
chasers
4y ago
Yeah the database ultimately guarantees that. This lets us distribute the fact that a connection exists (in the form of a PID) so that we don't have to go back to the db on every connection request. This helps quite a bit in the case o
45.
▲
by
chasers
4y ago
Yeah I plan to. Have some things to prep next week for ElixirConf but am going to get back to it after that.
46.
▲
by
chasers
4y ago
Pricing is still tbd unfortunately. Currently every project gets these features with some limitations: - 25 concurrent channels - 25 channel joins per second - 200 concurrent connections - 100 broadcast messages per second avg over 60 secon
47.
▲
by
chasers
4y ago
There is actually a case study on elixir-lang.org of exactly this! https://elixir-lang.org/blog/2021/01/13/orchestrating-comput...
48.
▲
by
chasers
4y ago
Yeah this is one of the reasons for these new features. So you don't have to send things like cursor positions, currently online, typing, etc through your database.
49.
▲
by
chasers
5y ago
Definitely feels like the beam was built for this kind of work.
50.
▲
by
chasers
6y ago
Thanks Jose! I picked up Elixir as my first language and have really enjoyed it.
51.
▲
by
chasers
6y ago
> I think the interesting part is the overlap between observability metrics for operations and expanding in to BI metrics with the same tools. I built Logflare so you could get your structured logs into BigQuery directly, so now you this
52.
▲
by
chasers
6y ago
Only three metadata fields or can you have more?
53.
▲
by
chasers
6y ago
So event sourcing?
54.
▲
by
chasers
6y ago
If anyone else was curious... "Our tracing pipeline has been in production for over a year now and we trace 1% of all requests from our clients. For some low volume services, we trace 100%. Our current pipeline processes ~310M traces&#
55.
▲
by
chasers
6y ago
> Processing/streaming logs to get metrics is a terrible waste of time, energy and money. Only if you're using Elastic.
56.
▲
by
chasers
6y ago
Kind of defeats the purpose. If you can bail you don't have to figure it out.
57.
▲
by
chasers
6y ago
This is awesome! Sure the data is not perfect but it's what we've for and the r naught is exactly what we need to be monitoring.
58.
▲
by
chasers
7y ago
Google Trends scraper.
59.
▲
by
chasers
7y ago
Elixir :)
60.
▲
by
chasers
7y ago
It sounds like they were maybe pattern matching to strictly. If the value is always a string just save the empty string and try to discover that service. If it doesn't exist, oh well, it doesn't crash the process.
More ›