Usage of mysql-native.

394 views
Skip to first unread message

Chris Dew

unread,
Aug 18, 2011, 4:04:39 AM8/18/11
to node-mysql-native
This is in response to an email from Andrey...

If anyone else wants to comment with how they use mysql-native, that
would be very interesting.

Our usage in app1 is:

~100 reads per sec. One read returns 1kb recordset on average
~10 writes (inserts)/sec. Write time not too important (say,
5 sec is ok), reads - as fast as possible, everything over 50 ms is
fail.
- long query, only run on server start or config change, takes > 90s
- one master + 1 replica set.

In app2:

no individual reads
~10 writes (inserts)/sec. Write time not too important (say,
5 sec is ok), reads - as fast as possible, everything over 50 ms is
fail.
- long query, only run on server start or config change, takes > 5s
- no replication yet (in development)

I don't think we have any performance issues with mysql-native as we
generally do long queries returning few rows.

Why no large requirement on record reads? We use a pattern called
LiveResultSet (similar to event sourcing) which means we keep result
sets in memory and update them as DBCE's (database changing events)
come in. As soon as data is received a cascade of events is triggered
which updates all displays of that data or aggregates which include it
(on browsersv via Socket.IO). The database is only read when as-yet-
uninstantiated result sets are required. I'll blog about this if
anyone's interested.

All the best,

Chris.
Reply all
Reply to author
Forward
0 new messages