scalability

Searching across shards?

杀马特。学长 韩版系。学妹 提交于 2019-12-03 08:04:21
Short version If I split my users into shards, how do I offer a "user search"? Obviously, I don't want every search to hit every shard. Long version By shard, I mean have multiple databases where each contains a fraction of the total data. For (a naive) example, the databases UserA, UserB, etc. might contain users whose names begin with "A", "B", etc. When a new user signs up, I simple examine his name and put him into the correct database. When a returning user signs in, I again look at his name to determine the correct database to pull his information from. The advantage of sharding vs read

severside processing vs client side processing + ajax?

自闭症网瘾萝莉.ら 提交于 2019-12-03 07:14:01
looking for some general advice and/or thoughts... i'm creating what i think to be more of a web application then web page, because i intend it to be like a gmail app where you would leave the page open all day long while getting updates "pushed" to the page (for the interested i'm using the comet programming technique). i've never created a web page before that was so rich in ajax and javascript (i am now a huge fan of jquery). because of this, time and time again when i'm implementing a new feature that requires a dynamic change in the UI that the server needs to know about, i am faced with

PHP object array's not linearly scale while global arrays do?

こ雲淡風輕ζ 提交于 2019-12-03 06:31:48
There is a major performance issue when using in-object array's as a property versus using a global php array variable, why? To benchmark this problem I created the following benchmark that stores an increasingly larger array with an stdClass as a node, two tests were run one using an array property in a class the other a global array. The test code ini_set('memory_limit', '2250M'); class MyTest { public $storage = []; public function push(){ $this->storage[] = [new stdClass()]; } } echo "Testing Objects".PHP_EOL; for($size = 1000; $size < 5000000; $size *= 2) { $start = milliseconds(); for (

What searching algorithm/concept is used in Google?

依然范特西╮ 提交于 2019-12-03 06:25:28
问题 What searching algorithm/concept is used in Google? 回答1: The Anatomy of a Large-Scale Hypertextual Web Search Engine 回答2: Indexing If you want to get down to basics: Google uses an inverted index of the Internet. What this means is that Google has an index of all pages it's crawled based on the terms in each page. For instance the term Google maps to this page, the Google home page, and the Wikipedia article for Google, amongst others. Thus, when you go to Google and type "Google" into the

Techniques for writing a scalable website

筅森魡賤 提交于 2019-12-03 06:01:35
问题 I am new in the website scalability realm. Can you suggest to me some the techniques for making a website scalable to a large number of users? 回答1: If you expect your site to scale beyond the capabilities of a single server you will need to plan carefully. Design so the following will be possible:- Make it so your database can be on a separate server. This isn't normally too hard. Ensure all your static content can be moved to a CDN, as this will normally pull a lot of load off your servers.

Cache layer for MVC - Model or controller?

♀尐吖头ヾ 提交于 2019-12-03 05:57:00
问题 I am having some second thoughts about where to implement the caching part. Where is the most appropriate place to implement it, you think? Inside every model, or in the controller? Approach 1 (psuedo-code): // mycontroller.php MyController extends Controller_class { function index () { $data = $this->model->getData(); echo $data; } } // myModel.php MyModel extends Model_Class{ function getData() { $data = memcached->get('data'); if (!$data) { $query->SQL_QUERY("Do query!"); } return $data; }

Does Seaside scale?

烈酒焚心 提交于 2019-12-03 05:45:53
问题 Seaside is known as "the heretical web framework". One of the points that make it heretical is that it has much shared state. That however is something which, in my current understanding, hinders easy scaling. Ruby on rails on the other hand shares as less state as possible. It has been known to scale pretty well, even if it is dog slow compared to modern smalltalk vms. flickr uses php and has scaled to an extremly big infrastructure... So has anybody some experience in the scaling of Seaside

Improving scalability of the modified preorder tree traversal algorithm

二次信任 提交于 2019-12-03 05:17:45
问题 I've been thinking about the modified preorder tree traversal algorithm for storing trees within a flat table (such as SQL). One property I dislike about the standard approach is that to insert a node you have to touch (on average) N/2 of the nodes (everything with left or right higher than the insert point). The implementations I've seen rely on sequentially numbered values. This leaves no room for updates. This seems bad for concurrency and scaling. Imagine you have a tree rooted at the

Microsoft Sync Framework - Performance and scalability

为君一笑 提交于 2019-12-03 05:04:23
I am trying to use Microsoft Sync Framework 2.1 on a SQL Server database. There will be a high number of concurrent end users, synchronizing with a central database server. Further specifications are: 1500 concurrent clients connect to 1 central database server Client are using MS SQL Server Express 2008 R2 Server is using MS SQL Server Enterprise 2008 R2 Short sync intervals (around 5 minutes) Database size will be 5 GB A webservice will be used as server-side SyncProvider Does anyone have experience with Sync Framework environments similar to this? Is it possible? What is important to take

Tomcat doing 15K req/second on a single server using Jersey Jax-RS

好久不见. 提交于 2019-12-03 04:38:52
问题 I tried testing things on a VPS, and came close to 10K requests per second, and that was a simple 'hello world' servlet , let alone making a call to membase. My VPS was a 2 x Intel Xeon X5570, quad-core “Nehalem” architecture. Note: I'm not a java expert, nor a tomcat expert, this was on default settings. Does anyone else deal with such high traffic that could shed some light? I used apache bench, and I ran it maybe 4-5 times, doing about 100K requests to the server. original: how to handle