How facebook works?

Facebook is social networking. People have been “facebooking” each other for about 6 years now, making Facebook the most used social network with over 350 million users worldwide. But how does Facebook work?

In this article, I will discuss Facebook’s inner workings, covering its architecture and frontend/backend infrastructure””the nuts and bolts that hold Facebook together.

How Does Facebook Work?””The Front End

Facebook uses a variety of services, tools, and programming languages to make up its core infrastructure. At the front end, their servers run a LAMP (Linux, Apache, MySQL, and PHP) stack with Memcache. Not a computer science expert? Let’s take a look at exactly what that means.

Linux & Apache

how does facebook work

This part is pretty self-explanatory. Linux is a Unix-like computer operating system kernel. It’s open source, very customizable, and good for security. Facebook runs the Linux operating system on Apache HTTP Servers. Apache is also free and is the most popular open source web server in use.

MySQL

how does facebook work

For the database, Facebook utilizes MySQL because of its speed and reliability. MySQL is used primarily as a key-value store as data is randomly distributed amongst a large set of logical instances. These logical instances are spread out across physical nodes and load balancing is done at the physical node level.

As far as customizations are concerned, Facebook has developed a custom partitioning scheme in which a global ID is assigned to all data. They also have a custom archiving scheme that is based on how frequent and recent data is on a per-user basis. Most data is distributed randomly.

PHP

how does facebook work

Facebook uses PHP because it is a good web programming language with extensive support and an active developer community and it is good for rapid iteration. PHP is a dynamically typed/interpreted scripting language.

Memcache

how facebook works

Memcache is a memory caching system that is used to speed up dynamic database-driven websites (like Facebook) by caching data and objects in RAM to reduce reading time. Memcache is Facebook’s primary form of caching and helps alleviate the database load.

Having a caching system allows Facebook to be as fast as it is at recalling your data. If it doesn’t have to go to the database it will just fetch your data from the cache based on your user ID.

Downsides to Using LAMP

Facebook has realized that there are downsides to using the LAMP stack. Notably, PHP is not necessarily optimized for large websites and therefore hard to scale. Also, it is not the fastest executing language and the extension framework is difficult to use.

how facebook works

Mike Schroepfer, Facebook’s Vice President of Engineering, recently did an interview at EmTech@MIT concerning this. “Scaling any website is a challenge,” Schroepfer said, “but scaling a social network has unique challenges.”

He went on to say that unlike other websites, you can’t just add more servers to solve the problem because of Facebook’s “huge interconnected dataset.” New connections are created all the time due to user activity.

Facebook has grown so quickly that they are often faced with issues regarding database queries, caching, and storage of data. Their database is huge and largely complex. To account for this, Facebook has started a lot of open source projects and backend services.

How Does Facebook Work?””The Back End

Facebook’s backend services are written in a variety of different programming languages including C++, Java, Python, and Erlang. Their philosophy for the creation of services is as follows:

1. Create a service if needed

2. Create a framework/toolset for easier creation of services

3. Use the right programming language for the task

A list of all of Facebook’s open source developments can be found here. I will discuss a few of the essential tools that Facebook has developed.

Thrift (protocol)

Thrift is a lightweight remote procedure call framework for scalable cross-language services development. Thrift supports C++, PHP, Python, Perl, Java, Ruby, Erlang, and others. It’s quick, saves development time, and provides a division of labor of work on high-performance servers and applications.

Scribe (log server)

Scribe is a server for aggregating log data streamed in real-time from many other servers. It is a scalable framework useful for logging a wide array of data. It is built on top of Thrift.

Cassandra (database)

how facebook works

Cassandra is a database management system designed to handle large amounts of data spread out across many servers. It powers Facebook’s Inbox Search feature and provides a structured key-value store with eventual consistency.

HipHop for PHP

HipHop for PHP is a source code transformer for PHP script code and was created to save server resources. HipHop transforms PHP source code into optimized C++. After doing this, it uses g++ to compile it to machine code.

Identify safe websites

On the whole Internet, there are approximately more than 150 million active websites up and running. As a result, it often becomes a real challenge for the users to identify safe websites that are trustworthy and reputed. Have you ever wondered to know the reputation of a website before placing the order? Need to know whether a given website is child safe? Well, here are some of the ways to identify safe websites on the Web.

1. WOT or Web Of Trust (www.mywot.com):

WOT is a great place to test the reputation of your favorite website. WOT gives real-time ratings for every website based on the feedback that it gets from millions of trustworthy users across the globe and trusted sources, such as phishing and malware blacklists. Each domain name is evaluated based on this data and ratings are applied to them accordingly. A snapshot of WOT ratings for gohacking.com is shown below:

As shown in the above snapshot, the reputation of each website is shown in terms of 4 components where green means excellent, yellow warns users to be cautious and red indicates potential danger.

Trustworthiness signifies the overall safety of the website. A poor rating may indicate that the site is associated with threats like Internet scams, phishing, identity theft risks and malware.

Vendor reliability tells you whether a given site is safe for carrying out buy and sell transactions with it. An excellent rating indicates superior customer satisfaction while a poor rating indicates possible scam or bad shopping experience.

Privacy indicates about “to what extent the site respects the privacy of it’s users and protects their personal identity and data”.

Child Safety indicates whether the content of a given site is appropriate for children. Site contents like sexual material, nudity and vulgarity will have a poor Child Safety rating.

In most cases, the WOT ratings are found to be highly accurate. To check the reputation of any given website, just visit www.mywot.com type-in the address of your favorite website and click on “Check now”. This tool alone can tell you a lot about the reputation and safety level of a website. However, in addition to this, I am giving you another 3 handy tools to identify safe websites on the Web.

2. McCafee SiteAdvisor:

McCafee SiteAdvisor is a free tool that is available as a browser add-on. It adds safety ratings to your browser and search engine results. You can download it from www.siteadvisor.com.

3. StopBadware:

Using this tool, you can check whether a given site is said to have involved in malware activity in the past. To check this, go to http://www.stopbadware.org/home/reportsearch and enter the URL or domain name of a website and click on “Search Clearinghouse ”. If the search does not return any result, that means the site was never involved in any of the malware activity in the past.

4. Google Pagerank:

Google PageRank is another great tool to check the reputation and popularity of a website. The PageRank tool rates every webpage on a scale of 1 to 10 which indicates Google’s view of importance of the page. If a given website has a PageRank of less than 3, then it is said to be less popular among the other sites on the Internet.

However, PageRank will only tell you how much popular a given website is and has nothing to do with the safety level of a website. So, this tool alone cannot be used to evaluate a website’s safety and other factors.

PageRank feature is available as a part of Google Toolbar. You can install Google Toolbar from http://www.google.com/intl/en_uk/toolbar/ie/index.html.

New Facebook Scam

In case you are curious to know how many people visit your Facebook profile, hold your curiosity. The app ‘My Total Facebook Views’ which has been doing rounds on the world’s most popular social networking site is yet another of those Facebook scams.


The rogue application attempts to trick Facebook users to click a malicious link that tells the number of people who visited their profile. Upon clicking the link, users are asked to fill out a survey and grant them access to their personal information. However, doing this leaves you vulnerable to malware that can be downloaded on your system when you click the link.

The scam, which is spreading virally via status updates, includes a link to the suspicious service and text that reads, “My total facebook views are: 1245 Find out your total profile views.”

There are no apps on Facebook to measure profile views currently, or know who visited your profile page. According to Facebook, “The exercise exposes your profile to malware and shares your personal information with an entity that will send you more spam in the near future.”

According to reports, the rogue app also runs by the names ProfileSpy and Pro Check. Last year too a similar scam that spread like wildfire had hit Facebook that offered insight into who viewed your Facebook profile.

Last week, another scam was reported to have affected a large number of Facebook users. This viral scam — My 1st St@atus — was designed to earn revenue for its perpetrators. In fact, messages claiming to share the users’ first ever Facebook status updates are still being posted on users’ walls by this rogue application though the number has come down since then.

Typical posts read — “My 1st St@tus was: ‘[random message]’. This was posted on [random date]. Find your 1st St@tus @ [LINK]”. When users clicked on this link, which appeared to have been posted by a Facebook friend, they were taken to a rogue Facebook application, just like in the case of ‘My Total Facebook Views’.

This application would then ask users to give it permission to access their profile. This would give the rogue application the ability to post the same message from the affected account to all in the friends’ list. Users were also taken to a webpage which contained a survey.

Save urself from hackerS

5 Tips to live safe on facebook and internet?


1. Do not go to the unidentified links : if somebody ask u to visit some external link on facebook which u don’t know is safe.Then don’t go on them. You you can trust some common blogs like

blogspot.com

wordpress.com

yolasite.com etc

do not touch any other link which u don’t know about. Because the WWW is very unsafe and somebody can steel ur cookies easily to hack ur e mail id and password.

2. Do not download any unknown software from unknown people or unknown unknown website. These softwares are ment to hack u.

they will install a keylogger in ur system or open backdoor for hackers to enter ur system and steel ur personal data.

3. Do not go to hacking websites which is not popular. intead rely on blogs because the blogs can’t contain any malicious software.

stick to this website for learning hacking.

4. use a proxy server this will reduce the chances of being hacked by hacker.

some of the proxy servers are :

Open Dns

Foxy proxy

hide my ip

5. Use good internet security software which will block you if u r going to visit any malicious website.

Best free internet security software comes with avg antivirus.and instaled as a toolbar.


Best Free antivirus softwares

Avira AntiVir Personal Edition is my top pick for the best free antivirus software if you’re looking for the best protection against virus, spyware and rootkit threats. AntiVir is very light on resources and the detection rate of malware is outstanding, better than almost every other antivirus according to tests. However, there are some minor reservations.

Microsoft Security Essentials is my personal favorite; with good detection rates, particularly for rootkits. Even more impressive is that Security Essentials has very few false positives, is light on resources and is good at removal of existing malware.

Avast! Free Antivirus is also an excellent free antivirus that is very popular. The antivirus detection rates is on par with AntiVir and Microsoft Security Essentials. Avast has the most features, with full real-time capabilities, including web, e-mail, IM, P2P and network shields, boot-time scanning, and a behavioural blocker. Avast is also light on resources.

Panda Cloud Antivirus is Panda’s attempt to jump on the free antivirus bandwagon. With a simple interface and completely automated features, it is an excellent choice for average users. The detection level is generally very high, but detection of zero day threats ios slightly lower.

AVG Anti-Virus Free Edition is also a decent choice for a free antivirus. Although this venerable antivirus has had some shaky results in detection in the recent past, it now offers a high level of protection.