Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
April 5, 2022 12:59 am GMT

Apps that don't scale (Fb, twitch, google) stories

Do you overthink about making your yet-to-be-made app scalable? Great you're not the only one, but should you?
Here are some scalability stories from famous tech that you use everyday.

Hope you'll find them insightful.

1) Facebook

As facebook started as little stanford project and then started scaling university campus wise. Do you know how they used to do that?
Facebook used to have a separate server for each campus with each having it's own code, MySql database, memecache. Each time FB need to have another campus they would install a new server with its own server, code, and database.
Each user was restricted to it's own campus, they would have weird "harvard.facebook.com" type url for each user.

Later when they decided to let different campus users talk to each other, it took them a year to come up with efficient so called single-global-table, where users can add each other globally.

2) Gmail

yeah I mean the defacto standard for emails, the Gmail. Do you how it was initiated & scaled?
A guy name Paul Buchheit from google didn't like to use existing email clients because he wasn't satisfied with their UI. So he hack together a little tool to just preview his emails in google groups UI & he like it. Then he started adding little new features when he feel like it should have something else, like let's add writing emails option, a delete button...

One day he showed his created little email client to his co-worker and he kinda like, but problem was he wasn't able to use his email in it, because Paul email was hardcodded in it. Paul just realized he should make it flexible to allow for other emails to be used instead of his one.
People start to using it inside google, a day it went down & someone came to Paul and said, do you know gmail has been down since morning. He said No, i was busy in work didn't know that :D

3) Twitch

Initially video streaming cost was very high when twitch started, every little details on their web page will fire a query to get data, e.g watch count, likes count etc
They decided to cut the cost by loading all website data in cache except video and chat. Therefore video wad played but none of button was interactive except chat. All those data was being loaded from local storage.
Later they figure out a way to cache using different strategies.

4) Google

At some point google algorithm to crawl pages become inefficient,it would take 3 weeks to crawl new pages.
Google stopped crawling new pages for 6 months & showed only the old crawled pages to users on search. Cool part was users didn't even notice that.

5) Friendster vs MySpace

Friendster used to have a feature to show you how far this connection is from you. But this little so called important functionality was very expensive. It wi fire a query for each user friend multiple times to figure by going through existing connections to figure out how this person is linked with current user. This functionality would fire tons of queries & took a lot of time.
Myspace used same feature but instead of finding connection through multiple queries, they would fire a single query if person is your friend otherwise they would show text, "this is your far connection" :D

Source: Y Combinator

Conclusion is, Don't stress too much about scaling before you even start, rather starts small & scale with the time.
Do you know any similar story? Please let us know in comment


Original Link: https://dev.to/uzair004/apps-that-dont-scale-fb-twitch-google-stories-196o

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To