Reader small image

You're reading from  Scaling Big Data with Hadoop and Solr, Second Edition

Product typeBook
Published inApr 2015
Publisher
ISBN-139781783553396
Edition1st Edition
Concepts
Right arrow
Author (1)
Hrishikesh Vijay Karambelkar
Hrishikesh Vijay Karambelkar
author image
Hrishikesh Vijay Karambelkar

Hrishikesh Vijay Karambelkar is an innovator and an enterprise architect with 16 years of software design and development experience, specifically in the areas of big data, enterprise search, data analytics, text mining, and databases. He is passionate about architecting new software implementations for the next generation of software solutions for various industries, including oil and gas, chemicals, manufacturing, utilities, healthcare, and government infrastructure. In the past, he has authored three books for Packt Publishing: two editions of Scaling Big Data with Hadoop and Solr and one of Scaling Apache Solr. He has also worked with graph databases, and some of his work has been published at international conferences such as VLDB and ICDE.
Read more about Hrishikesh Vijay Karambelkar

Right arrow

Chapter 3. Enabling Distributed Search using Apache Solr

With the growth of data for searching, it becomes necessary to scale up the performance of search applications, to cater to the increasing needs of indexing and searching quickly over large datasets. Distributed search can be used when a single index store becomes difficult to operate in terms of its size (large to fit in memory or disk). As more number of users start using enterprise search, single node searches have limitations in terms of response time and parallel sessions for users. For smaller data sizes, standalone search architecture performs better compared to distributed searches, due to single index availability. However, with the growth in the data size, its performance degrades eventually. The Distributed Search application increases the operation and maintenance cost. It also increases the complexity of overall landscape. However, with the scaling of information for searching, distributed search is the way to forward...

Working with SolrCloud


SolrCloud provides a new way to enable distributed enterprise search using a Apache Solr in enterprises. Previously, with the standard distributed Solr support, lot of the manual work had been automated by SolrCloud. With the introduction of SolrCloud, the manual steps like configuring solr-config.xml to talk with shards, adding documents to the shards, and so on, work became automatic. Unlike the traditional approach of master-slave based distributed Solr, SolrCloud provides a leader-replica-based approach as its implementation. SolrCloud runs on top of Apache ZooKeeper. First, let's understand the ZooKeeper.

Why ZooKeeper?

SolrCloud contains a cluster of nodes, which use Apache ZooKeeper to talk with each other. Apache ZooKeeper is responsible for maintaining co-ordination among various nodes. Besides co-ordinating among nodes, it also maintains configuration information, and group services to the distributed system. Due to its in-memory management of information;...

Sharding algorithm and fault tolerance


We have already seen the sharding, collection and replicas. In this section we will look at some of the important aspects of sharding, and how it plays a role in scalability and high availability. The strategy for creating new shards is highly dependent upon the hardware and the shard size. Let's say, you have two machines M1 & M2, of, the same configuration, each with one shard. Shard A is loaded with 1 million index documents, and shard B is loaded with 100 documents. When a query is fired, the query response to any Solr queries is determined by the query response of slowest node (in this case shard A). Hence having a shard with near to equal shard sizes can perform better in this case.

Document Routing and Sharding

Typically, when any enterprise search is deployed, the size of documents to be indexed keeps growing over time. Since SolrCloud provides a way to create a cluster of Solr nodes running on index shards, it becomes feasible to scale up...

Apache Solr and Big Data – integration with MongoDB


In an enterprise, data is generated from all the software that is participating in day-to-day operations. This data has different formats, and bringing in this data for big-data processing requires a storage system that is flexible enough to accommodate a data with varying data models. A NoSQL database, by its design, is best suited for this kind of storage requirements. One of the primary objectives of NoSQL is horizontal scaling, that is, the P in CAP theorem, but this works at the cost of sacrificing Consistency or Availability. Visit http://en.wikipedia.org/wiki/CAP_theorem to understand more about CAP theorem.

What is NoSQL and how is it related to Big Data?

As we have seen, data models for NoSQL differ completely from that of a relational database. With the flexible data model, it becomes very easy for developers to quickly integrate with the NoSQL database, and bring in large sized data from different data sources. This makes the NoSQL...

Summary


In this chapter, we have understood the distributed aspects of any enterprise search. We understood distributed search patterns, and how Apache Solr can be used as a distributed search. We started working with Apache SolrCloud, by understanding its architecture, and building a SolrCloud instance of development and production. We also looked at sharding strategies and fault tolerance. Finally, we went through Apache Solr and MongoDB together. In the coming chapter, we will see how Apache Hadoop and Solr can complement each other, alongside the various implementations of Solr with Hadoop.

lock icon
The rest of the chapter is locked
You have been reading a chapter from
Scaling Big Data with Hadoop and Solr, Second Edition
Published in: Apr 2015Publisher: ISBN-13: 9781783553396
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime

Author (1)

author image
Hrishikesh Vijay Karambelkar

Hrishikesh Vijay Karambelkar is an innovator and an enterprise architect with 16 years of software design and development experience, specifically in the areas of big data, enterprise search, data analytics, text mining, and databases. He is passionate about architecting new software implementations for the next generation of software solutions for various industries, including oil and gas, chemicals, manufacturing, utilities, healthcare, and government infrastructure. In the past, he has authored three books for Packt Publishing: two editions of Scaling Big Data with Hadoop and Solr and one of Scaling Apache Solr. He has also worked with graph databases, and some of his work has been published at international conferences such as VLDB and ICDE.
Read more about Hrishikesh Vijay Karambelkar