3 ms·
I've long wondered if there would be any performance advantage for an API server to zero-copy the DB response to the browser, deserializing from the DB wire pro
by password4321 3y ago
I've long wondered if there would be any performance advantage for an API server to zero-copy the DB response to the browser, deserializing from the DB wire protocol on the front end.
Or perhaps sending DB query results directly from DB server to browser, with the API server just initializing and securing.
Thanks for pointing out how JSON from the DB is another option for moving a bit of processing elsewhere in the stack.
- tomnipotent 3y agoYou've basically described Firebase and its archetype of database.
- vbezhenar 3y agoTLS everywhere makes the whole point of zero copying obsolete. Encryption eats so much CPU that copying data around does not change anything.
- 411111111111111 3y agoIt does add a few ms, but you're overstating it. For LAN traffic, it's usually 5-8ms last time I checked on my servers.