This presentation is focused on the architecture, scalability concerns, performance bottlenecks, operational characteristics and lessons learned while designing and implementing Yammer distributed real-time search system. Yammer is an enterprise social network SaaS offering with over 100,000 networks (including 85% of the Fortune 100) and nearly 2 million users. The search system we developed scales well up to 1B messages and serves a foundation of knowledge base analysis services Yammer is developing.
Injustice - Developers Among Us (SciFiDevCon 2024)
Realtime search at Yammer
1. Realtime revolution at work REAL-TIME SEARCH AT YAMMER May 25, 2011 By Boris Aleksandrovsky http://www.linkedin.com/in/baleksan Yammer, Inc. http://www.linkedin.com/in/baleksan
2.
3.
4. Challenges - From information to knowledge Information Facts Knowledge Attention Engagement Retention Messages Metadata Personalized Search
Similar to how a single malt is made, knowledge is distilled from information, facts and experience. The role of the search engine is to capture the process and make it readily available.
private and secure enterprise social network for coworkers and colleagues to communicate, collaborate, and coordinate An interactive online knowledge base that connects dispersed workers in ways that are easy, real-time, social, and searchable A way to share what’s relevant to the right colleagues , by drawing attention to and discussing important issues “ The Social Glue” to an organization , driving better collaboration and process improvements while preserving institutional knowledge Real-time communication, coordination Business continuity and relevance Global connectivity, accessible anywhere
“ Introducing Yammer: combining the new ways we communicate, with the consumerization of enterprise software to achieve faster communications, better collaboration, and more productivity.” Overview of the key features but emphasize this is a Knowledge Base: Search for answers and topics, identify collaborators and experts, Messaging and Feeds: Ask questions, start discussions. Share news, links, opinions, and ideas. Streamline communication, understand context in threaded conversations. My Feed, Company Feed, RSS Feeds: follow what and who are of most interest to you, stay on top of company news, add RSS to stay informed. Direct Messaging: Send private direct messages to co-workers, reduce email volume, add others who can catch up by reading thread histories. User Profiles: Each user creates a profile with their photo, title, and background. Easily connect with co-workers and expertise Company Directory: Upgrade to enterprise for additional security and admin features, including company directory integration. Help new employees quickly get up to speed. Groups and Communities: build engagement by creating internal Groups around projects and topics, and external Communities with partners and customers. Applications: Share files, enhance productivity, and increase collaboration through Yammer’s suite of core apps and a la carte Third Party Apps for document sharing, tracking, helpdesk ticketing, and more. Integrations: SharePoint 2007 and 2010, Outlook, Salesforce, soon: Box Access and Mobility: Access Yammer anywhere, through the web, Desktop client, IM, SMS, Microsoft Sharepoint, and mobile applications (iPhone, Blackberry, Android, Windows Mobile). Translations: soon available in 100 languages Network Consultation and Support: included with enterprise upgrade OTHER stuff to talk about if you like: @People and #Topics: Quickly loop co-workers into conversations and tag topics for further information discovery and sharing. Connectivity and Crisis Communications: connect your dispersed workforce, crowdsource ideas, and broadcast company-wide in times of critical need.
“ We know our product inside and out from our work with over 100K+ company networks. From product iterations to customer use cases, to deployment and engagement services, we have a depth of expertise that has made us the market leader.”
Before getting into the product – let’s get at the problem(s) Yammer is attempting to address…
From the perspective of search, people use Yammer today in two modes. First, they want to simply capture the information which might have scrolled out of view in their Yammer feed. This is very similar to Twitter - I check it once in a while, but what have I missed since the last time? For this use-case we want to present search results in reverse chronological order and answer simple queries. The second mode is the knowledge exploration mode. Yammer is a knowledge base created by interactions between colleagues over time within a company. Yammer can help with the on-boarding process, faq's, tips, computer setup, company procedures and processes, practices and culture. For this, search is an entry point and quite possibly the most important interaction element. We need to answer complicated queries and present results based on textual similarity, popularity, engagement and social distance.
From the perspective of search, people use Yammer today in two modes. First, they want to simply capture the information which might have scrolled out of view in their Yammer feed. This is very similar to Twitter - I check it once in a while, but what have I missed since the last time? For this use-case we want to present search results in reverse chronological order and answer simple queries. The second mode is the knowledge exploration mode. Yammer is a knowledge base created by interactions between colleagues over time within a company. Yammer can help with the on-boarding process, faq's, tips, computer setup, company procedures and processes, practices and culture. For this, search is an entry point and quite possibly the most important interaction element. We need to answer complicated queries and present results based on textual similarity, popularity, engagement and social distance. Wikis working in groups - people are creating some connections but they are not well organized.
he biggest challenges for search at Yammer is the real time nature of the information and the complicated relevancy story. Information on Yammer should be indexed and available for users to search in real time, virtually in less then a second. This makes the Yammer indexing system similar to Twitter where tweets are indexed in real time. Search results likewise are available in reverse chronological order which is based on the assumption that for certain types of events, timeliness is the most pertinent characteristic. This maps really well into types of content like news where relevancy declines fairly rapidly as time passes, or for types of content which are more transient in nature, like events and meetings. There are other types of content where the relationship between the creator of the content and the searcher is important, and also the sheer popularity of the content is important. This is more of a Facebook newsfeed case, which tries to present content from people you value or interact with most. A good example will be communications from your boss, or an expert opinion you trust. Popular discussion threads which capture the attention of the company are important to find since they usually encompass the "company culture". There are however other types of content that are much more knowledge heavy and with the retrieval of each textual similarity, reputation and potential for engagement are more important then timeliness. For instance when the sales representative is searching for a relevant approach to a particular client industry, then he would be interested in the experiences of all other sales people who tried to sell to that industry, and he would want to look back as far as the records go. This is a case where Yammer's search system is trying to act more like Google search system
Out of order delivery source of all (most) evil Easily 50% of complexity is there. Solution Garanteee in-order delivery - buffer and wait - degrades performance, availability and only garantees very eventual consistency Minimize the probability and forget - ts precesion - clock skew Solution Arbitrate - based on ts / vector clocks (ts+versions) - based on semantics - based on business cases - need to index tombstones (mark-for-delete)
Out of order delivery source of all (most) evil Easily 50% of complexity is there. Solution Garanteee in-order delivery - buffer and wait - degrades performance, availability and only garantees very eventual consistency Minimize the probability and forget - ts precesion - clock skew Solution Arbitrate - based on ts / vector clocks (ts+versions) - based on semantics - based on business cases - need to index tombstones (mark-for-delete)
Editable TOC or bullet slide
Editable TOC or bullet slide
- Dual indexing - primary index for serving out - secondary index for reindexing - Verify secondary index consistency - foreach replica in turn - shutdown - mv secondary to primary - restart - Availability should not be affected except for slight chance of system failure on the serving replica.
- Indexing problems Detect - index integrity tool checks against the :source of truth: - identifies patches Reindex - gaps - whole - reindex into secondary, swap with primary Repair job - patch in place
Call all - more predictable latency profile, index warmup advantage Round robin - when under load stress Least busy - most complicated, requires metrics poll, prone to errors when burstable activity
- Testing Indexing Idempotent Out-of-order delivery 10K docs delivered in random order with X% of dupes Search Build small manual index by recording events Create unit-test style tests with Asserts
- Production Metrics Alerts via Zabbix (Zabbix is awesome) Puppet Ganglia for machine level diagnostics Have enough redundancy
Gauges are instantaneous readings of values (e.g., a queue depth). Counters are 64-bit integers which can be incremented or decremented. Meters are increment-only counters which keep track of the rate of events. They provide mean rates, plus exponentially-weighted moving averages which use the same formula that the UNIX 1-, 5-, and 15-minute load averages use. Histograms capture distribution measurements about a metric: the count, maximum, minimum, mean, standard deviation, median, 75th percentile, 95th percentile, 98th percentile, 99th percentile, and 99.9th percentile of the recorded values. (They do so using a method called reservoir sampling which allows them to efficiently keep a small, statistically representative sample of all the measurements.) Timers record the duration as well as the rate of events. In addition to the rate information that meters provide, timers also provide the same metrics as histograms about the recorded durations. (The samples that timers keep in order to calculate percentiles and such are biased towards more recent data, since you probably care more about how your application is doing now as opposed to how it's done historically.)
Gauges are instantaneous readings of values (e.g., a queue depth). Counters are 64-bit integers which can be incremented or decremented. Meters are increment-only counters which keep track of the rate of events. They provide mean rates, plus exponentially-weighted moving averages which use the same formula that the UNIX 1-, 5-, and 15-minute load averages use. Histograms capture distribution measurements about a metric: the count, maximum, minimum, mean, standard deviation, median, 75th percentile, 95th percentile, 98th percentile, 99th percentile, and 99.9th percentile of the recorded values. (They do so using a method called reservoir sampling which allows them to efficiently keep a small, statistically representative sample of all the measurements.) Timers record the duration as well as the rate of events. In addition to the rate information that meters provide, timers also provide the same metrics as histograms about the recorded durations. (The samples that timers keep in order to calculate percentiles and such are biased towards more recent data, since you probably care more about how your application is doing now as opposed to how it's done historically.)
Gauges are instantaneous readings of values (e.g., a queue depth). Counters are 64-bit integers which can be incremented or decremented. Meters are increment-only counters which keep track of the rate of events. They provide mean rates, plus exponentially-weighted moving averages which use the same formula that the UNIX 1-, 5-, and 15-minute load averages use. Histograms capture distribution measurements about a metric: the count, maximum, minimum, mean, standard deviation, median, 75th percentile, 95th percentile, 98th percentile, 99th percentile, and 99.9th percentile of the recorded values. (They do so using a method called reservoir sampling which allows them to efficiently keep a small, statistically representative sample of all the measurements.) Timers record the duration as well as the rate of events. In addition to the rate information that meters provide, timers also provide the same metrics as histograms about the recorded durations. (The samples that timers keep in order to calculate percentiles and such are biased towards more recent data, since you probably care more about how your application is doing now as opposed to how it's done historically.)
Gauges are instantaneous readings of values (e.g., a queue depth). Counters are 64-bit integers which can be incremented or decremented. Meters are increment-only counters which keep track of the rate of events. They provide mean rates, plus exponentially-weighted moving averages which use the same formula that the UNIX 1-, 5-, and 15-minute load averages use. Histograms capture distribution measurements about a metric: the count, maximum, minimum, mean, standard deviation, median, 75th percentile, 95th percentile, 98th percentile, 99th percentile, and 99.9th percentile of the recorded values. (They do so using a method called reservoir sampling which allows them to efficiently keep a small, statistically representative sample of all the measurements.) Timers record the duration as well as the rate of events. In addition to the rate information that meters provide, timers also provide the same metrics as histograms about the recorded durations. (The samples that timers keep in order to calculate percentiles and such are biased towards more recent data, since you probably care more about how your application is doing now as opposed to how it's done historically.)
Gauges are instantaneous readings of values (e.g., a queue depth). Counters are 64-bit integers which can be incremented or decremented. Meters are increment-only counters which keep track of the rate of events. They provide mean rates, plus exponentially-weighted moving averages which use the same formula that the UNIX 1-, 5-, and 15-minute load averages use. Histograms capture distribution measurements about a metric: the count, maximum, minimum, mean, standard deviation, median, 75th percentile, 95th percentile, 98th percentile, 99th percentile, and 99.9th percentile of the recorded values. (They do so using a method called reservoir sampling which allows them to efficiently keep a small, statistically representative sample of all the measurements.) Timers record the duration as well as the rate of events. In addition to the rate information that meters provide, timers also provide the same metrics as histograms about the recorded durations. (The samples that timers keep in order to calculate percentiles and such are biased towards more recent data, since you probably care more about how your application is doing now as opposed to how it's done historically.)