This is not the document you are looking for? Use the search form below to find more!

Report

# How LinkedIn uses memcached, a spoonful of SOA, and a sprinkle of SQL to scale

Document Description
JDBC â€“ We donâ€™t need no stinking JDBC. How LinkedIn uses memcached, a spoonful of SOA, and a sprinkle of SQL to scale. David Raccah & Dhananjay Ragade LinkedIn Corporation…
File Details
• File size: 2.08mb
• Pages: 55
• content preview
Submitter
• Name: gertruda

Related Documents

## The Law Of Returns To Scale

by: alina, 11 pages

The Law Of Returns To Scale The Laws Of Returns To Scale The laws of returns to scale explain the behavior of output in response to a proportional and simultaneous…

## How do you Find the Circumference of a Circle

by: tutorvistateam_team, 4 pages

It is the ratio of change in ‘y’ when change in ‘x’. The slope of the line measures the steepness of the given line. We are using two word “rise over run”. In the ...

## How do you Find the Circumference of a Circle

by: vistateam123, 4 pages

It is the ratio of change in ‘y’ when change in ‘x’. The slope of the line measures the steepness of the given line. We are using two word “rise over run”. In the ...

## How do you Find the Circumference of a Circle

by: site_circle, 4 pages

It is the ratio of change in ‘y’ when change in ‘x’. The slope of the line measures the steepness of the given line. We are using two word “rise over run”. In the ...

## How do you Make a Histogram

by: circleteam123, 4 pages

A graph is a type of geometrical mathematics to solve the problems that are related to the mathematics. Basically graph is used to represent the sample data or records in the visualize form. The ...

## How I Make Over \$1000 Dollars A Month With PAID TO CLICK

by: Movieshdnow, 1 pages

How I Make Over \$1000 Dollars A Month With PAID TO CLICK

## How Can I Have A Girlfriend

by: How Can I Have A Girlfriend, 27 pages

How Can I Have A Girlfriend? Learn the Answer Through Our Effective Dating Tips and Strategies.

## List of Reits to buy

by: walter, 12 pages

## A Healthy Labor Bag and a Healthy Child|Healthier infants begin with healthier mamas|Wholesome Begin Healthier Infant

by: childcord87, 2 pages

As I like to say: â€œHealthy infants start off with healthier mamas.â€ Based on a research review ...

## How do you Find the Area of a Rectangle

by: tutorvistateam_team, 4 pages

In Euclidean geometrical mathematics, there are several types of shapes and figures are defined that are generated by the various mathematician. Form one of them; rectangle is the geometrical shape ...

Content Preview
1. JDBC â€“ We donâ€™t need no stinking JDBC. How LinkedIn uses memcached, a spoonful of SOA, and a sprinkle of SQL to scale. David Raccah & Dhananjay Ragade LinkedIn Corporation
2. Goal of this Presentation What you will learn How LinkedIn built a cheap and scalable system to store our memberâ€™s profiles, and how you can do the same 2
3. Agenda > Review system ilities > What happened to databases? > SOA What > Discuss existing Best Practices > Pixie Dust and Kool-Aid are not so bad > What LinkedInâ€™s got up their sleeve > How it all came togetherâ€¦ > Q&A 3
4. Terminology of the ilities the terms of large successful systems > Performance ? Not an â€śilityâ€ť but without it, no ility will save you > Availability ? Availability is the proportion of time a system is in a functioning condition > Reliability ? The probability that a functional unit will perform its required function for a specified interval under stated conditions. ? The ability of something to "fail well" (fail without catastrophic consequences) 4
5. Terminology of the ilities the terms of large successful systems > Scalability ? Slow with multiple users vs. single user > Manageability ? The ability to manage all parts of a large moving system > Serviceability ? The ability to service an arm of the system without bleeding to death (e.g. change out a database from a working system). Bleeding is OK in a high performance system â€“ death is NOT acceptable. 5
6. Agenda > Review system ilities > What happened to databases? > SOA What > Discuss existing Best Practices > Pixie Dust and Kool-Aid are not so bad > What LinkedInâ€™s got up their sleeve > How it all came togetherâ€¦ > Q&A 6
7. Databases The systems that drive the enterprise â€¦ orâ€¦. > RDBMS â€“ Relational Data Base Management System Attribute > KVSS â€“ Key Value Storage System > Enterprise Search Engines 7
8. Database Server Historyâ€¦. 8
9. Database mind set has changedâ€¦ From data access to data management toâ€¦. > Initially it was all about remote data access with an index > Then it moved to ACID data management and tooling > Then it became an Application Server with data affinity > Now we have come full circle and people have figured out that scaling is more important than relationships, transactions, and data and behavioral affinity. 9
10. Database Mantra that Rule the Roost ACID > Atomicity â€“ All or nothing > Consistency â€“ Data in the system should never get in a contradictory state. > Isolation: Two requests cannot interfere with one another. > Durability: No do over â€“ once the data is persisted, it cannot change. 10
11. Anti-Database Rules BASE > Basically Available ? Support partial failures within your architecture (e.g. sharding) > Soft state ? State may be out of synch for some time > Eventually consistent ? Eventually all data is made consistent (as long as the hardware is reliable) 11
12. Database Scalability Or lack thereofâ€¦ > Databases work. Look at: ? Hotmail ? Facebook ? eBay > Databases scale with hardware > They do not scale horizontally well ? Partition management is nonexistent and RYO is a mess ? Many use them as ISAM and not even relational 12
13. Database Tools and language Duhâ€¦ > Defacto standards for tools and languages abound for relational databases > Easy to manage the data within a partition and easy to write code to operate on said data > Terrifying but nice to use extensions include running Java within the Data Engine, so that you could run your application within the big iron 13
14. Databaseâ€™s other features Which are the pain pointsâ€¦. > Constraints â€“ Nice idea until you start partitioning. 2PC is the anti-scalability pattern (Pat Helland) > Computation â€“ this feature turns out to cause more pain as cost rises with scale and are incompatible with most languages and tools. > Replication & backup ? Nice tools that are indeed important and useful > ACL support & Data Engine optimizations ? Used for sure, but exist to circumvent deficiencies 14
15. Key Value Storage Systems BigTable, Hive, Dynamoâ€“ the Wild Wild West > Reliable â€“ Proven on web > Available â€“ redundant (locally) > Scalable â€“ no constraints > Limited ACIDity > No Standard and not portable > Almost no: ? Constraints or relationships ? Computation or transactions 15
16. Enterprise Search Engines Index yes â€“ storage device no > A great inverted index > Finds data quickly > However, what it returns is commonly an ID to the entity(s) in question > Real-Time solutions are available but not fully deployed today > Limited ACIDity/transactions > Scalable, available, reliable 16
17. Agenda > Review system ilities > What happened to databases? > SOA What > Discuss existing Best Practices > Pixie Dust and Kool-Aid are not so bad > What LinkedInâ€™s got up their sleeve > How it all came togetherâ€¦ > Q&A 17
18. SOA Service Oriented Architecture > SOA may be overkill for most enterprises > Still a Tiered and layered architecture â€“ which is what SOA hoped to formulate and standardize is a solid approach > Services (not SOA) allow for efficient reuse of business processes and aggregation services within a complex development organization 18
19. Agenda > Review system ilities > What happened to databases? > SOA What > Discuss existing Best Practices > Pixie Dust and Kool-Aid are not so bad > What LinkedInâ€™s got up their sleeve > How it all came togetherâ€¦ > Q&A 19
20. Best Practices Storage and architecture > Store critical data redundantly and reliably with a cluster ? Google via BigTable, Facebook via MySQL, eBay via replicated & sharded DB > Layer services on top of the storage device to manage data integrity and complexity ? LinkedIn, Amazon, eBay 20
21. Best Practices Storage and architecture > Create a bus to route replicated data to consumers â€“ e.g. search, data mining, etc. ? Almost all sites > Parallelization via things like scatter/gather ? Almost all search topologies (Google, Yahoo, Live), ? Facebook, etc. 21
22. Best Practices Storage and architecture > Keep the system stateless ? eBay, Google, etc. > Partition data and services ? Facebook, eBay > Cache data > Replicate your data > Route requests to where the behavior and/or data exists > Degrade gracefully with load 22
23. Best Practices Storage and architecture > Tiering systems ? Latency vs. Affinity ? Traversal versus affinity â€“ you need to analyze the cost and make a decision ? Scaling vs. parallelizing ? Do you need to keep tiering all systems to keep the scalability uniform? ? Complexity vs. diminished dependencies ? Does the reduced dependencies make up for the increased system complexity? 23
24. Agenda > Review system ilities > What happened to databases? > SOA What > Discuss existing Best Practices > Pixie Dust and Kool-Aid are not so bad > What LinkedInâ€™s got up their sleeve > How it all came togetherâ€¦ > Q&A 24
25. Pixie Dust and Kool-Aid Building on the past 25
26. Pixie Dust and Kool-Aid Building on the past > So what do we want: ? Reliable ? Available ? Scalable ? ACIDity on simple transactions ? Standard and portable interface ? Data Optimizations ? Cache and replicate ? Low cost BASE architecture 26
27. Agenda > Review system ilities > What happened to databases? > SOA What > Discuss existing Best Practices > Pixie Dust and Kool-Aid are not so bad > What LinkedInâ€™s got up their sleeve > How it all came togetherâ€¦ > Q&A 27
28. LinkedInâ€™s Data Services Mixture of standards and pixie dust > Front a database with a service > Cache data > Route to and partition the data service > Scale and replicate services in a horizontal manner > Keep all writes ACID and subsequent reads ACID as well 28
29. LinkedInâ€™s Data Services Mixture of standards and pixie dust > Databases are reliable > Scale out at the service > Replicate and cache > Partitioning comes from the front tier and business servers that front the data services 29
30. LinkedInâ€™s Data Services Immediate replication vs. eventual replication > Caching needs a consistency algorithm > Techniques for immediate replication ? Paxos ? Chubby, Microsoft AutoPilot, Zoo Keeper ? N Phase Commit (2PC and 3PC) > Techniques for eventual consistency ? BASE (Basically Available, Soft-state, Eventual Consistency ? Inktomi, Dynamo, AWS 30
31. LinkedInâ€™s Data Services LinkedInâ€™s approach > Keep core data ACID > Keep replicated and cached data BASE > Replicate data via the data bus > Cache data on a cheap memory (memcached) > Use a hint to route the client to his / herâ€™s ACID data 31
32. LinkedInâ€™s Data Services Databus â€“ the linchpin of our replication 32
34. LinkedInâ€™s Data Services Core DS > Keep core data ACID in the DB > All writes come here. > Databus source for all replication > The last line of defense for a cache miss > Manages sharding 34
35. LinkedInâ€™s Data Services RepDS > Manages cache consistency and replication > Manages the freshness of the caller > Reads come from cache 35
36. LinkedInâ€™s Data Services RepReader > RepReader is the typical tip of the iceberg problem > All read operations are sourced from the cache unless the callerâ€™s freshness token is out of the window 36
37. LinkedInâ€™s Data Services Freshness Token (AKA Pixie Dust) > The freshness token = Pixie Dust for CUD operations > It also allows us to give the caller control over whether they are content with BASE data, even if they did no CUD operation. 37
38. LinkedInâ€™s Data Services For the love of Pixie dust and Kool-Aid > We use commodity hardware and software to run our service > We use Pixie Dust to keep costs down and keep our customer happy > We keep OPS and the exec-staff happy with our special brand of Kool- Aid 38
39. Agenda > Review system ilities > What happened to databases? > SOA What > Discuss existing Best Practices > Pixie Dust and Kool-Aid are not so bad > What LinkedInâ€™s got up their sleeve > How it all came togetherâ€¦ > Q&A 39
40. Profile Re-architecture Changing planes in mid-flight > Original LinkedIn System > Use of XML for i18n > Phased Transition 40
41. Problems from the original system Anthropology 101 > Be fairâ€¦ it worked well for a startup > Many tables in one big DB > Too many similar object hierarchies > No well defined domains 41
42. Why XML? Flexibility > Profile has many fields > 1NF for I18n ==> too many tables > StAX for fast parsing > Easier to version the profile > Human readable > JSON? ProtoBuf? 42
43. Issues with XML <good/> <bad/> <ugly/> > XML schema design tradeoffs and analytics impact > XML is verbose > StAX is unfriendly > XML in the DB caused us some performance headaches 43
44. Phased Transition Evolving a living, breathing organism > Successive iterations avoid breakages > No major site downtime > Easier to sanity check > Does not hold other teams hostage > Phases LinkedIn went through 44
45. Double Writes Topology Safety first 45
46. After Legacy Tables Dropped Auld Lang Syne 46
47. Wrap up The moral of the story isâ€¦ > Keep your system BASE > Use commodity hardware > Use pixie dust (AKA data freshness token) > Evolve slowly - no big bang! 47
48. Q&A 48
50. Appendix
51. Performance Often mixed up with scalability > Performance ? A numerical value given to a single system when asked to do a task under nominal load ? If the system responds poorly without load, it will assuredly continue its molasses response time under load 51
52. Availability Often mixed up with reliability > Availability ? A numerical value given to a system that defines the proportion of time a system is in a functioning condition. ? Most common scoring system is called nines â€“ which is defined as the uptime versus the uptime and downtime â€“ five nines = 0.99999 52
53. Reliability The ability for a system to perform its functionality > Reliability ? A system can be 100% available and still be 100% unreliable (e.g. non consistent caching) ? A person can consistently give you the wrong answer ? Architecture is defined as the balance of the ilities and cost 53
54. Scalability the term that many think is the holy grail > Scalability ? The ability for a system to manage more traffic or to be â€śscaledâ€ť as more traffic appears ? System slows with multiple users vs. single user ? Route, Partition, Orchestrate, replicate, and go asynch ? Split the system horizontally ? Rarely scale vertically 54
55. The rest of the ilities the ones that people tend to ignore till its too late > Manageability ? It is a double-edged sword which can be easily ignored > Serviceability ? Here complexity starts to rear its ugly head > Maintainability ? Of course maintainability tends to run upstream of complexity 55

How LinkedIn uses memcached, a spoonful of SOA, and a sprinkle of SQL to scale

Share How LinkedIn uses memcached, a spoonful of SOA, and a sprinkle of SQL to scale to:

example:

http://myblog.wordpress.com/
or
http://myblog.com/

Share How LinkedIn uses memcached, a spoonful of SOA, and a sprinkle of SQL to scale as:

From:

To:

Share How LinkedIn uses memcached, a spoonful of SOA, and a sprinkle of SQL to scale.

Enter two words as shown below. If you cannot read the words, click the refresh icon.

Share How LinkedIn uses memcached, a spoonful of SOA, and a sprinkle of SQL to scale as:

Copy html code above and paste to your web page.