What are the caveats for using nodejs for huge systems like ecommerce, which expects to get about a million page-views per month?
-
I read stuff about nodejs and how it's different from traditional way of processing requests. What are the limitations of it using in a huge-scale systems like e-commerce , which expects to make huge transactions, on an average. Is anybody using nodejs at that big a scale yet ? What are some good resources on reading about using nodejs in such environments ? What would be an ideal tech-stack with it ?
-
Answer:
The most important thing to know about Node is why it's different from other platforms. Node's strength is in it's evented, callback-driven nature (asynchronous, aka non-blocking). Page requests are going to be perfectly aligned with Node's strengths. A request is nothing but an event and the returning of the assets for that request is the callback. Beautiful! So, since page views are not a concern with Node, what is? Well, due to JavaScript's single threaded nature, it's not optimally designed for heavy data chrunching. So, the relevant question is how much data processing will your ecommerce site have to handle? I honestly can't think of much heavy data processing for an ecommerce site. It seems mostly just data requests (again events), I&O (perfect) and small mathematical functions (no problem). So, I would bet that Node would be just fine for an ecommerce site. Now, if you were building a financial platform or handling statistical analysis with report generation, you should probably avoid Node, or at least be aware of how to work around JavaScript's single thread limitation (e.g. spin up additional nodes/workers to mimic parallel processing, aka threads). As far as your other questions, I think addressed them well.
Justin Lowery at Quora Visit the source
Other answers
A million page-views a month is not much, honestly, and nothing a well written Node application cannot handle easily. Linkedin[1], Microsoft, eBay, and Walmart[2], are some of the better known brand names using Node but the published list of companies[and projects is quite long[3]. The main caveat I can think of is that it takes discipline to write a performant, well structured Node application. It's easy for a Node project in the hands of the uninitiated to spiral into an unstructured, non-performant mess. To best avoid the pitfalls there's a wealth of well-established patterns and best practices out there to use as examples. Just scan Github, Stack Overflow, Quora, etc. for examples. A year ago I was apprehensive about using Node for our production systems due to its maturity at the time. I said I'd give it a year and I did. Now we have Node backing at least one very high traffic application that's in the works and are using it for critical subsystems of other high traffic applications. [1] - http://venturebeat.com/2011/08/16/linkedin-node/ [2] - http://venturebeat.com/2012/01/24/why-walmart-is-using-node-js/ [3] - https://github.com/joyent/node/wiki/Projects,-Applications,-and-Companies-Using-Node
Chris Longo
Like Justin said, it really just comes down to the question: is your application more IO-intensive (huge amount of DB reading/writing) or more computation-intensive (huge amount of computation)? I think a e-commerce site falls into the former case, and that's where Node.js shines.
Derek Chiang
Related Q & A:
- How will the search rank get impacted if i move my mobile website to a single page application?Best solution by Webmasters
- In the simplest clearest language possible, can any one tell me step by step how to get a web page or domain?Best solution by Yahoo! Answers
- What is the difference between hits and page views?Best solution by Yahoo! Answers
- How much per month does a pilot get?Best solution by Yahoo! Answers
- Is it possible to get a 6 pack in 1 month?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.