You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
e.g. start with bad program does things like fs.*Sync calls then provide simulated traffic and test using benchmark… hint at various performance techniques e.g. always async, in-memory caching, leveldb, horizontal scaling with cluster and modularising app across multiple processes.
what about creating a single http server in every problem which our solution would test in terms of performance (number of concurrent requests) and if the number is higher than the required by the problem, the solution would pass?
It would be also nice to expose some other benchmark results like averageResponseTime or numberOfTimedoutRequests just to show the students how different techniques can affect relatively simple CRUD server performance.
Introduction - Horizontal/Vertical scaling - what it is, cluster module - short overview
First problem - Preparations, clustering a single http server we gonna use in next problems
Second problem - A get endpoint with a sync filesystem call
Third problem - All sync methods converted to async ones
Fourth problem - Eliminating filesystem call by keeping first lookup results in-memory
Fifth problem - Keeping in-memory cache persistent during restarts (e.g. leveldb)
To make the results and differences more visible, we can consider passing a special blocking readFile method that contains either a timeout or a sleep inside, just to make it a bit slower.
e.g. start with bad program does things like fs.*Sync calls then provide simulated traffic and test using benchmark… hint at various performance techniques e.g. always async, in-memory caching, leveldb, horizontal scaling with cluster and modularising app across multiple processes.
suggested in nodeschool/discussions#181
Does anyone have a suggested outline for the lesson?
The text was updated successfully, but these errors were encountered: