Scaling Node.js

Load balancing Most probably for the most simple sites you don’t need any scaling at all. Just one single box will get you covered. After that you should do load balancing like you are mentioning which is almost the same for every architecture(like you are saying you could start multiple node processes first. But when … Read more

WebRTC – scalable live stream broadcasting / multicasting

As it was pretty much covered here, what you are trying to do here is not possible with plain, old-fashionned WebRTC (strictly peer-to-peer). Because as it was said earlier, WebRTC connections renegotiate encryption keys to encrypt data, for each session. So your broadcaster (B) will indeed need to upload its stream as many times as … Read more

C++ Socket Server – Unable to saturate CPU

boost::asio is not as thread-friendly as you would hope – there is a big lock around the epoll code in boost/asio/detail/epoll_reactor.hpp which means that only one thread can call into the kernel’s epoll syscall at a time. And for very small requests this makes all the difference (meaning you will only see roughly single-threaded performance). … Read more

Algorithm for autocomplete?

For (heh) awesome fuzzy/partial string matching algorithms, check out Damn Cool Algorithms: http://blog.notdot.net/2007/4/Damn-Cool-Algorithms-Part-1-BK-Trees http://blog.notdot.net/2010/07/Damn-Cool-Algorithms-Levenshtein-Automata These don’t replace tries, but rather prevent brute-force lookups in tries – which is still a huge win. Next, you probably want a way to bound the size of the trie: keep a trie of recent/top N words used globally; for … Read more

Scalable Contains method for LINQ against a SQL backend

I’ve solved this problem with a little different approach a view month ago. Maybe it’s a good solution for you too. I didn’t want my solution to change the query itself. So a ids.ChunkContains(p.Id) or a special WhereContains method was unfeasible. Also should the solution be able to combine a Contains with another filter as … Read more

How Scalable is SQLite? [closed]

Yesterday I released a small site* to track your rep that used a shared SQLite database for all visitors. Unfortunately, even with the modest load that it put on my host it ran quite slowly. This is because the entire database was locked every time someone viewed the page because it contained updates/inserts. I soon … Read more

A beginner’s guide to SQL database design [closed]

I started with this book: Relational Database Design Clearly Explained (The Morgan Kaufmann Series in Data Management Systems) (Paperback) by Jan L. Harrington and found it very clear and helpful and as you get up to speed this one was good too Database Systems: A Practical Approach to Design, Implementation and Management (International Computer Science … Read more