|By James Meickle||
|September 13, 2013 10:00 AM EDT||
Your site is indexed on Google, but that doesn't mean you're done with search. Content-rich websites provide native search functionality to keep users engaged, maintain visual consistency, and provide content-aware filtering. But it's very hard to implement an effective, scalable search system, which is why Apache Solr is just about the most popular ‘black box' in web application infrastructure. This Lucene-backed search appliance has seen wide adoption due to its performance, reliability, and ease of deployment. In fact, it's become so widely used that many Solr deployments are managed by people who have no other exposure to running Java applications. Documents go in, indexed RESTful search comes out - that is, until something breaks.
TraceView can provide insight into Apache Solr instances by correlating individual traces with JMX metrics, such as the rate of requests over the past 5 minutes. Even at a very low overall volume, an increased traffic rate is already increasing request latency.
Unlike most web application front-ends, Solr is a complex, stateful application that contains persistent objects, runs background indexing processes, and maintains multiple tiers of caches. There are a lot of ways to deploy and configure Solr, and that means there are a lot of ways to make mistakes. But even when you have everything up and running, there's always the lingering question of whether you could be getting more out of your Solr instances (or reducing the number of them!).
One of the best ways to get insight into Solr's internal abstractions - such as cores, handlers, and components - is to monitor them directly via JMX. I've previously written about using JMX metrics to keep tabs on JVM memory internals, but JMX is a common API for collecting data from your Java applications and any application can make use of it. Because of this it's been widely adopted in the Java ecosystem to centralize the provision of application-specific performance data.
Solr provides JMX metrics on a variety of internals, such as queryResultCache.
Solr exposes hundreds of JMX metrics across dozens of categories, and efficient use of them can help you delve into Solr performance in a variety of ways. Some metrics are better for providing a high-level view of Solr's overall workflow. The
queryResultCachecategory, pictured above, provides a snapshot of how often your data was successfully cached, as well as how often cache entries had to be evicted due to insufficient space. Other metric categories are more granular and provide detail at the level of classes, or even objects. An update request will be routed to a different handler depending on whether the data was provided in XML, CSV, or JSON; each of these update handlers exposes metrics independently, like how long it has been running and the number of errors.
JMX metrics can even provide insight into advanced Solr use cases, like modifying result scoring to permit n-dimensional spatial searches or customizing results based on user data stored in Redis. Even without adding custom JMX metrics, Solr will report enough data to allow you to separately track the effectiveness of these custom searches relative to more traditional queries.
Let's look at a practical example. You just got paged because half of your distributed Solr cluster lost connectivity in a widespread EC2 outage. It looks like it might last a while, so you decide to add additional capacity in one of the functioning availability zones. Rather than spending time re-indexing your content, you decide to replicate your existing Solr data to the new servers. Using the high-level metrics provided by
ReplicationHandler, you determine that replication is proceeding smoothly. Halfway through your second replication, though, you realize that the first replicated server is taking five times as long as your original servers to respond to the same user queries, even though it's running on the same hardware. Checking out the cache metrics for a specific search handler, it looks like the hit ratios on its caches are abysmal - but wait, what's actually in those caches? After checking the metrics for that node's active Searcher instance, you realize you didn't set up Solr to warm the cache - it was starting off empty! Now you know to make a quick configuration change next time you spin up an instance so that the first users routed to it will have acceptable performance.
So, that sounds awesome - but how do you do it? The easiest approach is to view Solr's JMX statistics through its web interface (in Solr 3.x,
/solr/admin/stats.jsp, while in Solr 4.x it's available at a collection-based URL like
/solr/#/collection1/plugins/). However, web access won't be an option for most deployments. Alternately, you could use remote jconsole, but that requires either a complex remote configuration that's a tremendous hassle to set up or the glacially slow option of SSH X11 forwarding (e.g.,
ssh -X solr jconsole).
In practice, those approaches all suck. Solr is stunningly verbose: it exposes hundreds of JMX metrics out of the box, and that number expands quickly as you add additional handlers and components. Purpose-built JMX monitoring tools like
jconsole are great for browsing the available metrics to see what's available, but they're horrible for pulling out the ones you want in a hurry. They also allow ‘write' operations like initiating garbage collection or clearing caches - definitely not something you want to give out to every developer!
TraceView automatically monitors the JMX metrics of every node involved in this distributed Solr Cloud trace.
On a day to day basis, it's more common to read JMX metrics via automated, ‘read-only' monitoring tools like Nagios, Ganglia, or AppNeta TraceView. These tools not only present a number of metrics at once, but they also generally let you filter down to a meaningful subset of the hundreds of lines exposed by Solr. On the other hand, "health check"-style metrics aren't necessarily the only way to look the problem. Each request has a number of metrics it can generate, and bringing together these data sources in one application has some real advantages. Looking at an individual request can tell you exactly what went wrong, it's often the context of JMX data that says why. Examining the concurrent host activity can disambiguate between whether a pause was due to a garbage collection event in the JVM or an overloaded document cache in Solr forcing additional disk access.
Next time, we'll talk about how TraceView captures these request-based metrics directly from the Solr internals. In the meantime, if you've got a Solr installation, sign up for your free account, put in on that server, and take a look inside that black box!
Internet of Things (IoT) will be a hybrid ecosystem of diverse devices and sensors collaborating with operational and enterprise systems to create the next big application. In their session at @ThingsExpo, Bramh Gupta, founder and CEO of robomq.io, and Fred Yatzeck, principal architect leading product development at robomq.io, discussed how choosing the right middleware and integration strategy from the get-go will enable IoT solution developers to adapt and grow with the industry, while at the same time reduce Time to Market (TTM) by using plug and play capabilities offered by a robust IoT ...
Jun. 29, 2015 06:00 PM EDT Reads: 1,759
The Internet of Things is not only adding billions of sensors and billions of terabytes to the Internet. It is also forcing a fundamental change in the way we envision Information Technology. For the first time, more data is being created by devices at the edge of the Internet rather than from centralized systems. What does this mean for today's IT professional? In this Power Panel at @ThingsExpo, moderated by Conference Chair Roger Strukhoff, panelists addressed this very serious issue of profound change in the industry.
Jun. 29, 2015 12:19 PM EDT Reads: 675
SYS-CON Events announced today that BMC will exhibit at SYS-CON's 16th International Cloud Expo®, which will take place on June 9-11, 2015, at the Javits Center in New York City, NY. BMC delivers software solutions that help IT transform digital enterprises for the ultimate competitive business advantage. BMC has worked with thousands of leading companies to create and deliver powerful IT management services. From mainframe to cloud to mobile, BMC pairs high-speed digital innovation with robust IT industrialization – allowing customers to provide amazing user experiences with optimized IT per...
Jun. 29, 2015 12:15 PM EDT Reads: 2,563
There will be 150 billion connected devices by 2020. New digital businesses have already disrupted value chains across every industry. APIs are at the center of the digital business. You need to understand what assets you have that can be exposed digitally, what their digital value chain is, and how to create an effective business model around that value chain to compete in this economy. No enterprise can be complacent and not engage in the digital economy. Learn how to be the disruptor and not the disruptee.
Jun. 29, 2015 11:00 AM EDT Reads: 2,116
Internet of Things is moving from being a hype to a reality. Experts estimate that internet connected cars will grow to 152 million, while over 100 million internet connected wireless light bulbs and lamps will be operational by 2020. These and many other intriguing statistics highlight the importance of Internet powered devices and how market penetration is going to multiply many times over in the next few years.
Jun. 29, 2015 11:00 AM EDT Reads: 1,884
It is one thing to build single industrial IoT applications, but what will it take to build the Smart Cities and truly society-changing applications of the future? The technology won’t be the problem, it will be the number of parties that need to work together and be aligned in their motivation to succeed. In his session at @ThingsExpo, Jason Mondanaro, Director, Product Management at Metanga, discussed how you can plan to cooperate, partner, and form lasting all-star teams to change the world and it starts with business models and monetization strategies.
Jun. 29, 2015 10:00 AM EDT Reads: 2,037
The Internet of Things is not only adding billions of sensors and billions of terabytes to the Internet. It is also forcing a fundamental change in the way we envision Information Technology. For the first time, more data is being created by devices at the edge of the Internet rather than from centralized systems. What does this mean for today's IT professional? In this Power Panel at @ThingsExpo, moderated by Conference Chair Roger Strukhoff, panelists will addresses this very serious issue of profound change in the industry.
Jun. 29, 2015 09:45 AM EDT Reads: 2,447
Business as usual for IT is evolving into a "Make or Buy" decision on a service-by-service conversation with input from the LOBs. How does your organization move forward with cloud? In his general session at 16th Cloud Expo, Paul Maravei, Regional Sales Manager, Hybrid Cloud and Managed Services at Cisco, discusses how Cisco and its partners offer a market-leading portfolio and ecosystem of cloud infrastructure and application services that allow you to uniquely and securely combine cloud business applications and services across multiple cloud delivery models.
Jun. 28, 2015 11:00 AM EDT Reads: 2,174
In his General Session at 16th Cloud Expo, David Shacochis, host of The Hybrid IT Files podcast and Vice President at CenturyLink, investigated three key trends of the “gigabit economy" though the story of a Fortune 500 communications company in transformation. Narrating how multi-modal hybrid IT, service automation, and agile delivery all intersect, he will cover the role of storytelling and empathy in achieving strategic alignment between the enterprise and its information technology.
Jun. 27, 2015 10:00 AM EDT Reads: 2,192
Buzzword alert: Microservices and IoT at a DevOps conference? What could possibly go wrong? In this Power Panel at DevOps Summit, moderated by Jason Bloomberg, the leading expert on architecting agility for the enterprise and president of Intellyx, panelists peeled away the buzz and discuss the important architectural principles behind implementing IoT solutions for the enterprise. As remote IoT devices and sensors become increasingly intelligent, they become part of our distributed cloud environment, and we must architect and code accordingly. At the very least, you'll have no problem fillin...
Jun. 26, 2015 12:00 PM EDT Reads: 2,186
Growth hacking is common for startups to make unheard-of progress in building their business. Career Hacks can help Geek Girls and those who support them (yes, that's you too, Dad!) to excel in this typically male-dominated world. Get ready to learn the facts: Is there a bias against women in the tech / developer communities? Why are women 50% of the workforce, but hold only 24% of the STEM or IT positions? Some beginnings of what to do about it! In her Opening Keynote at 16th Cloud Expo, Sandy Carter, IBM General Manager Cloud Ecosystem and Developers, and a Social Business Evangelist, d...
Jun. 26, 2015 10:00 AM EDT Reads: 2,045
Converging digital disruptions is creating a major sea change - Cisco calls this the Internet of Everything (IoE). IoE is the network connection of People, Process, Data and Things, fueled by Cloud, Mobile, Social, Analytics and Security, and it represents a $19Trillion value-at-stake over the next 10 years. In her keynote at @ThingsExpo, Manjula Talreja, VP of Cisco Consulting Services, discussed IoE and the enormous opportunities it provides to public and private firms alike. She will share what businesses must do to thrive in the IoE economy, citing examples from several industry sectors.
Jun. 25, 2015 02:00 PM EDT Reads: 1,987
In his keynote at 16th Cloud Expo, Rodney Rogers, CEO of Virtustream, discussed the evolution of the company from inception to its recent acquisition by EMC – including personal insights, lessons learned (and some WTF moments) along the way. Learn how Virtustream’s unique approach of combining the economics and elasticity of the consumer cloud model with proper performance, application automation and security into a platform became a breakout success with enterprise customers and a natural fit for the EMC Federation.
Jun. 25, 2015 01:30 PM EDT Reads: 2,132
SYS-CON Events announced today that the "Second Containers & Microservices Conference" will take place November 3-5, 2015, at the Santa Clara Convention Center, Santa Clara, CA, and the “Third Containers & Microservices Conference” will take place June 7-9, 2016, at Javits Center in New York City. Containers and microservices have become topics of intense interest throughout the cloud developer and enterprise IT communities.
Jun. 22, 2015 02:15 PM EDT Reads: 2,714
SYS-CON Events announced today that the "First Containers & Microservices Conference" will take place June 9-11, 2015, at the Javits Center in New York City. The “Second Containers & Microservices Conference” will take place November 3-5, 2015, at Santa Clara Convention Center, Santa Clara, CA. Containers and microservices have become topics of intense interest throughout the cloud developer and enterprise IT communities.
Jun. 20, 2015 12:00 PM EDT Reads: 3,835
With major technology companies and startups seriously embracing IoT strategies, now is the perfect time to attend @ThingsExpo in Silicon Valley. Learn what is going on, contribute to the discussions, and ensure that your enterprise is as "IoT-Ready" as it can be! Internet of @ThingsExpo, taking place Nov 3-5, 2015, at the Santa Clara Convention Center in Santa Clara, CA, is co-located with 17th Cloud Expo and will feature technical sessions from a rock star conference faculty and the leading industry players in the world. The Internet of Things (IoT) is the most profound change in personal an...
Jun. 15, 2015 08:45 PM EDT Reads: 4,065
17th Cloud Expo, taking place Nov 3-5, 2015, at the Santa Clara Convention Center in Santa Clara, CA, will feature technical sessions from a rock star conference faculty and the leading industry players in the world. Cloud computing is now being embraced by a majority of enterprises of all sizes. Yesterday's debate about public vs. private has transformed into the reality of hybrid cloud: a recent survey shows that 74% of enterprises have a hybrid cloud strategy. Meanwhile, 94% of enterprises are using some form of XaaS – software, platform, and infrastructure as a service.
Jun. 15, 2015 07:15 PM EDT Reads: 3,860
The 17th International Cloud Expo has announced that its Call for Papers is open. 17th International Cloud Expo, to be held November 3-5, 2015, at the Santa Clara Convention Center in Santa Clara, CA, brings together Cloud Computing, APM, APIs, Microservices, Security, Big Data, Internet of Things, DevOps and WebRTC to one location. With cloud computing driving a higher percentage of enterprise IT budgets every year, it becomes increasingly important to plant your flag in this fast-expanding business opportunity. Submit your speaking proposal today!
Jun. 15, 2015 10:15 AM EDT Reads: 5,916
In his keynote at 16th Cloud Expo, Rodney Rogers, CEO of Virtustream, discusses the evolution of the company from inception to its recent acquisition by EMC – including personal insights, lessons learned (and some WTF moments) along the way. Learn how Virtustream’s unique approach of combining the economics and elasticity of the consumer cloud model with proper performance, application automation and security into a platform became a breakout success with enterprise customers and a natural fit for the EMC Federation.
Jun. 11, 2015 08:00 AM EDT Reads: 2,315
The 4th International Internet of @ThingsExpo, co-located with the 17th International Cloud Expo - to be held November 3-5, 2015, at the Santa Clara Convention Center in Santa Clara, CA - announces that its Call for Papers is open. The Internet of Things (IoT) is the biggest idea since the creation of the Worldwide Web more than 20 years ago.
Jun. 10, 2015 06:00 PM EDT Reads: 3,311