Closed kiwicopple closed 3 years ago
Weird, looks like there's no performance numbers for Debezium as late as 2018. I was thinking about trying their approach for benchmarking CDC. The gitter chat link from the bottom has some interesting ideas though.
I think @inian actually started some work on this one?
I have some basic code with k6 and websockets but have not managed to get it working fully - test never seems to finish (might be related to https://github.com/supabase/supabase-js/issues/44). I can push it a separate branch if needed so that you can work on top of that if it helps.
Note that the changes aren't in the main release of supabase-js yet, so you could consider using realtime-js
directly for this one: https://github.com/supabase/realtime-js
Let me know if you spot any problems - it's our new interface so I want to make sure it's working well
Pushed my old attempt here. It is very much a work in progress.
I have documented my challenges in getting k6 to work with our realtime server here
I have modified the webpack config to get the script to play nice with k6's custom runtime. These hacks are very inelegant but at least doesn't throw any error when running the test.
Even though the test doesn't error out, it doesn't seem to terminate (or start?)
One small annoyance: need to uncap the no. of open file descriptors for the Realtime server and possibly the client. (More info here). There's also a section for this in Phoenix's 2m WebSockets article, might want to follow it as well.
...
fs.nr_open=2147483584
fs.file-max=2147483584
[Service]
...
LimitNOFILE=214783584
ulimit -n 214783584
ALTER SYSTEM SET wal_level = logical;
ALTER SYSTEM SET max_replication_slots = 5;
CREATE PUBLICATION supabase_realtime FOR ALL TABLES;
CREATE TABLE foo (id SERIAL);
ALTER TABLE foo REPLICA IDENTITY FULL;
INSERT
per secondCPU utilization at 7%. If we ignore Amdahl's Law, a ~10x machine would get us to 100k :)
Great work on setting this up Bobbie. Have you pushed the benchmarking code somewhere?
Can you test on the following instances as well?
For next steps, it would be interesting to know what load would push the CPU to 100% (or is memory the bottleneck?) on these instances..
👌
The only relevant code I guess is the node-js realtime example code, I'll try working on a reproducible bench suite with the modified code and AWS CLI/SDK (or if you have something like this, I'll use that).
Other next steps:
Chore
As part of our move from Alpha to Beta, we will want to be clear about the limitations and performance of each of the components in Supabase. We need to do 3 things: