@sriharshasm
Project Manager at DEShaw & Co.
Nothing here yet.
Nothing here yet.
No blogs yet.
Why would you create a lambda function for express application instead of deploying it ? It doesn't make any sense, web servers need to be deployed. Lambda functions is useful to do one time tasks, or for things that are purely computational. What exactly does your web server do?
Good article! Nice research and explanation on variable stack size! You may have got the node server part wrong. A node web server of a doesn't use a separate thread for each connection, instead it insert into event loop . In fact you can scale nodejs server to serve thousands of clients as long as your you are not doing any CPU bound operations. Nodejs is "single threaded" in the user space , but uses multiple threads under the hood. A single thread picks up the tasks from event loop and executes it, whereas any I/O operations are executed on a fixed number of "OS" threads. The scalability issue with nodejs is not from the memory constraint (although this is the case with traditional java application servers like Tomcat which uses a thread per client, you can't scale them) but from the CPU, if you have any parts of application that does computation in nodejs, it is take out all the time leaving other tasks in the event loop waiting. Your tests doesn't has much details, if you write simple hello world web server in both nodejs/golang and benchmark them against # of clients/memory usage you will realize this. In short: Nodejs : Excels in the async I/O, good for building agree gators of different services, but bad for any computationally heavy application. Golang : Excels at concurrency, so can be used for both I/O as well as CPU bound applications, any general purpose software.