In the company I have built search engine based on ElasticSearch and distributed system of data import. I would like to share my experience and speak about the following topics:
– What the search engine is and why it’s needed?
– What platforms exist to choose from?
– ElasticSearch and its capabilities.
– How to ensure continuous data flow?
– Maintenance of data consistency.
– Reduce to a minimum effort needed for search extension.
– Lessons learned.
Alexander Tokarev is a database performance architect who gave a presentation on his experience using Oracle In-Memory technology for a faceted search project. The project involved tagging 3 million objects with 42 million tags, which was loaded into an Oracle database. Initial performance testing without In-Memory showed slow query speeds. After implementing Oracle In-Memory, query performance improved up to 21 times faster. However, Tokarev discovered that not all Oracle In-Memory features provided significant benefits and some caused issues. With tuning, the final In-Memory implementation led to a 4x overall performance boost for the faceted search queries.
Sumo Logic's first How-To webinar focused on optimizing our users' search experience. The webinar covers the following:
- Developing good search habits
- Setting the proper expectations around search performance
- The factors related to search speed
- Creating field extraction rules
- Defining a partitioning strategy
- Configuring scheduled views
Efficient Scalable Search in a Multi-Tenant Environment: Presented by Harry H...Lucidworks
This document discusses efficient scalable search in a multi-tenant environment. It describes Bloomberg Vault, which hosts large volumes of enterprise communications and documents for compliance. The system uses a distributed architecture with shards that are loaded on demand to serve search queries. Security is ensured by dynamically generating field values that encapsulate access permissions for each user's view of a document.
Data Analysis with Apache Flink (Hadoop Summit, 2015)Aljoscha Krettek
Apache Flink is an open source project that offers both batch and stream processing on top of a common runtime and exposing a common API.
This talk shows how you can easily analyse data with Apache Flink. We present a new relational API and also the new Apache Flink Machine Learning library.
The presentation describes how to design robust solution for tagging search, how to use tagging for faceted search. Various architecture and data patterns are considered. We discuss relational databases like Oracle, full text search servers like Apache Solr. We will see how Oracle 18c features permit to use embedded faceted search.
(ATS6-PLAT02) Accelrys Catalog and Protocol ValidationBIOVIA
Accelrys Catalog is a powerful new technology for creating an index of the protocols and components within your organization. You will learn about strategies for indexing and how search capabilities can be deployed to professional client and Web Port end users. You will also learn how to use this technology to find out about system usage to aid with system upgrades, server consolidations, and general system maintenance. The protocol validation capability in the admin portal allows administrators to created standard reports on server usage characteristics. You will learn how to report on violations of IT policies (e.g. around security), bad protocol authoring practices, or missing or incomplete protocol documentation. Developers will also learn how to extend and customize the rules used to create these reports.
Crossref's ORCID Auto-Update allows publishers to deposit author ORCID IDs with article metadata. With authors' permission, Crossref will automatically post their works to their ORCID profile and update it with any future publications. This benefits authors by compiling their works in one place. Over 1.4 million works have been deposited with ORCIDs so far, with hundreds of thousands automatically updated on authors' profiles through this service.
Alexander Tokarev is a database performance architect who gave a presentation on his experience using Oracle In-Memory technology for a faceted search project. The project involved tagging 3 million objects with 42 million tags, which was loaded into an Oracle database. Initial performance testing without In-Memory showed slow query speeds. After implementing Oracle In-Memory, query performance improved up to 21 times faster. However, Tokarev discovered that not all Oracle In-Memory features provided significant benefits and some caused issues. With tuning, the final In-Memory implementation led to a 4x overall performance boost for the faceted search queries.
Sumo Logic's first How-To webinar focused on optimizing our users' search experience. The webinar covers the following:
- Developing good search habits
- Setting the proper expectations around search performance
- The factors related to search speed
- Creating field extraction rules
- Defining a partitioning strategy
- Configuring scheduled views
Efficient Scalable Search in a Multi-Tenant Environment: Presented by Harry H...Lucidworks
This document discusses efficient scalable search in a multi-tenant environment. It describes Bloomberg Vault, which hosts large volumes of enterprise communications and documents for compliance. The system uses a distributed architecture with shards that are loaded on demand to serve search queries. Security is ensured by dynamically generating field values that encapsulate access permissions for each user's view of a document.
Data Analysis with Apache Flink (Hadoop Summit, 2015)Aljoscha Krettek
Apache Flink is an open source project that offers both batch and stream processing on top of a common runtime and exposing a common API.
This talk shows how you can easily analyse data with Apache Flink. We present a new relational API and also the new Apache Flink Machine Learning library.
The presentation describes how to design robust solution for tagging search, how to use tagging for faceted search. Various architecture and data patterns are considered. We discuss relational databases like Oracle, full text search servers like Apache Solr. We will see how Oracle 18c features permit to use embedded faceted search.
(ATS6-PLAT02) Accelrys Catalog and Protocol ValidationBIOVIA
Accelrys Catalog is a powerful new technology for creating an index of the protocols and components within your organization. You will learn about strategies for indexing and how search capabilities can be deployed to professional client and Web Port end users. You will also learn how to use this technology to find out about system usage to aid with system upgrades, server consolidations, and general system maintenance. The protocol validation capability in the admin portal allows administrators to created standard reports on server usage characteristics. You will learn how to report on violations of IT policies (e.g. around security), bad protocol authoring practices, or missing or incomplete protocol documentation. Developers will also learn how to extend and customize the rules used to create these reports.
Crossref's ORCID Auto-Update allows publishers to deposit author ORCID IDs with article metadata. With authors' permission, Crossref will automatically post their works to their ORCID profile and update it with any future publications. This benefits authors by compiling their works in one place. Over 1.4 million works have been deposited with ORCIDs so far, with hundreds of thousands automatically updated on authors' profiles through this service.
The document discusses Solr 4, an open source search platform built on Apache Lucene. Some key points:
- Solr 4 is a NoSQL search server that provides distributed indexing, fault tolerance, and real-time search capabilities.
- Solr Cloud is Solr's distributed architecture which uses Zookeeper for coordination to provide features like automatic sharding and replication of indexes across multiple servers.
- The document outlines Solr 4's capabilities including schema-less options, atomic updates, optimistic concurrency, and a REST API for managing the schema dynamically.
Sumo Logic - Optimizing Your Search Experience (2016-08-17)Sumo Logic
The document discusses optimizing searches in Sumo Logic. It covers basic search structure, setting performance expectations, and optimization tools like field extraction rules, partitions, and scheduled views. Field extraction rules extract fields during ingestion to standardize searches and simplify parsing. Partitions divide data to improve search performance by searching smaller chunks. Scheduled views pre-aggregate data to significantly improve performance for selective queries and long-term trend analysis. The document provides recommendations on when and how to use these optimization tools to improve search performance.
This document summarizes best practices for improving ASP.NET performance based on testing with various tools. Key findings include that a DataReader is faster than a DataSet, inline SQL is faster than stored procedures, caching improves performance, and reducing ViewState usage and templates improves speed. The presenter advocates using profiling tools to test performance and recommends strategies like optimizing database queries, caching data, and minimizing unnecessary page elements.
This document summarizes Apache Flink community updates from June 2015. It discusses the 0.9.0 release of Apache Flink, an open source platform for scalable batch and stream data processing. Key points include the addition of two new committers, blog posts and workshops promoting Flink, and various conference and meetup talks about Flink occurring that month. It encourages registration for the Flink Forward conference in October 2015.
Your Big Data Stack is Too Big!: Presented by Timothy Potter, LucidworksLucidworks
Timothy Potter presented at a Big Data conference in Boston from October 11-14, 2016. He discussed how Lucidworks Fusion provides an alternative to traditional big data stacks that emphasizes fast access, agility and automation over integration. Fusion allows for common access patterns like fast lookups, ranked retrieval and distributed scans while integrating technologies like Solr, Spark, HDFS and more. It provides tools for data ingestion, time-based partitioning, analytics, machine learning and more to solve business problems rather than focus on infrastructure.
QuickStart your Sumo Logic service with this exclusive webinar. At these monthly live events you will learn how to capitalize on critical capabilities that can amplify your log analytics and monitoring experience while providing you with meaningful business and IT insights
The document describes a document summarizer platform that can generate summaries from input text or URLs using predefined summarizers. It determines the relevance of the summaries to computer science by passing them to a Word2Vec model. The platform allows developers to easily test different summarizers and choose the most suitable one for their domain based on the calculated relevance scores.
Consuming External Content and Enriching Content with Apache Cameltherealgaston
This document discusses using Apache Camel as a document processing platform to enrich content from Adobe Experience Manager (AEM) before indexing it into a search engine like Solr. It presents the typical direct integration of AEM and search that has limitations, and proposes using Camel to offload processing and make the integration more fault tolerant. Key aspects covered include using Camel's enterprise integration patterns to extract content from AEM, transform and enrich it through multiple processing stages, and submit it to Solr. The presentation includes examples of how to model content as messages in Camel and build the integration using its Java DSL.
How Rackspace Cloud Monitoring uses Cassandragdusbabek
This document summarizes a Cassandra usage example. It describes using Cassandra for a monitoring control (CM) cluster and a separate data cluster. The CM cluster stores metadata and configuration in Cassandra and uses a Node.js API and ORM. The data cluster ingests high-volume time-series metrics data, performs rollups to different granularities (minutes, hours, days), and stores the results in Cassandra for fast retrieval.
The Query Service is the new platform solution for querying a variety of data sources. The goal of Query Service is that administrators can configure a metadata description of the data source that can then be used by end users without detailed knowledge of the underlying data source. This session explains how to configure Query Service data sources and use them with the RESTful API or component collection.
hbaseconasia2019 Phoenix Improvements and Practices on Cloud HBase at AlibabaMichael Stack
Yun Zhang
Track 2: Ecology and Solutions
https://open.mi.com/conference/hbasecon-asia-2019
THE COMMUNITY EVENT FOR APACHE HBASE™
July 20th, 2019 - Sheraton Hotel, Beijing, China
https://hbase.apache.org/hbaseconasia-2019/
This document provides an introduction to enterprise search and its key components. It discusses how search engines work by building indexes on text and answering queries using those indexes. The two main components are indexing, which structures data for easy searching, and search, which returns results based on user queries against the index. It introduces common file formats that can be indexed like text, HTML, PDFs. Lucene and Solr are introduced as open source search libraries, with Solr building on Lucene and adding features like indexing, querying via HTTP, and admin interfaces. The document demonstrates adding, deleting, and searching for documents in Solr.
Journey of Implementing Solr at Target: Presented by Raja Ramachandran, TargetLucidworks
This document summarizes Target's implementation of Solr as its search platform. It discusses how Target transitioned from Oracle-Endeca to Solr to handle its large scale data and enable more flexible relevancy controls. It describes how Target tested Solr through handling live guest traffic in two sprints and moving its typeahead functionality to the public cloud. Finally, it outlines how Target leverages key Solr capabilities like collection aliases, atomic updates, and configurable facets to synchronize designer and product launches.
SharePoint Search Topology and OptimizationMike Maadarani
This document contains a presentation on SharePoint 2013 search topology and optimization. It discusses the search architecture in SharePoint 2010 and 2013, and how the search components like crawl, query processing, and indexing are distributed across servers. It provides guidance on how to configure search topologies for small, medium and large farms based on the number of items and queries per second. It also covers search configuration options like authorities, query rules and the query builder to tune search relevance.
Azure Search is a cloud search service that allows developers to add search functionality to applications. Key features include scalability, powerful querying abilities, scoring profiles, and search navigation options. To use Azure Search, developers first create a search service, then define indexes and documents. Documents are added to indexes which are optimized data structures for search. Queries can be executed against indexes to retrieve relevant documents based on search terms. Results can be filtered and scored using various options in Azure Search.
Presented by Andrzej Bialecki, LucidWorks
This session presents a set of Solr components for easy management of "sidecar indexes" - indexes that extend the main index with additional stored and / or indexed fields. Conceptually this can be viewed as an extension of the ExternalFileField or as a static join between documents from two collections. This functionality is useful in applications that require very different update regimes for the two parts of the index (e.g. main catalogue items combined with clickthroughs).
Columnar Table Performance Enhancements Of Greenplum Database with Block Meta...Ontico
HighLoad++ 2017
Зал «Рио-де-Жанейро», 7 ноября, 13:00
Тезисы:
http://www.highload.ru/2017/abstracts/2923.html
Alibaba built up a data warehouse service named HybridDB in its public cloud service, based on the open sourced Greenplum Database. And it keeps on enhancing HybridDB's preformance. This presentation will talk about how Alibaba improves HybridDB's performance for columnar tables with data block's meta data (MIN/MAX values of block data) and sort keys (pre-defined keys that data will be sorted and stored with). Testing result shows that, block metadata can be generated on-the-fly without much overhead, but can achive better performance even than index scan. With sort keys, a constant response time can be archived for GROUP-BY and ORDER-BY queries.
Simple Fuzzy Name Matching in Solr: Presented by Chris Mack, Basis TechnologyLucidworks
This document describes a custom Solr plugin for fuzzy name matching. The plugin handles challenges like name variations and ambiguity. It creates a custom field type that scores name matches and supports multiple fields and values per document. At query time, it generates a custom Lucene query to find candidates, then uses Solr's rerank feature to rescore the top results based on the name matching algorithm. The plugin is configurable to trade off accuracy versus speed and supports multi-lingual name matching.
Cassandra Day Chicago 2015: Top 5 Tips/Tricks with Apache Cassandra and DSEDataStax Academy
The document provides 5 tips for using Cassandra and DSE: 1) Data modeling best practices to avoid secondary indexes, 2) Understanding compaction choices like size-tiered, leveled, and date-tiered and their use cases, 3) Common mistakes in proofs-of-concept like testing on different hardware and empty nodes, 4) Hardware recommendations like using moderate sized nodes with SSDs, and 5) Anti-patterns like loading large batches of data and modeling queues with improper partitioning.
Taking Splunk to the Next Level - Architecture Breakout SessionSplunk
This document discusses strategies for scaling a Splunk deployment. It begins by describing how customers typically start with a single use case but then need to scale to handle more data and use cases. It then covers strategies for scaling the forwarding, indexing, search, and management components of Splunk. Key topics include load balancing forwarders, using indexer clustering for high availability, scaling search heads by clustering, and using the deployment server and distributed management console for centralized management. The document emphasizes planning storage capacity and I/O when scaling indexers and considering Splunk's application support when scaling search heads.
The document discusses Microsoft's ALM Search service architecture and design. It describes plans for the search indexing and query pipelines, including using Elastic Search for indexing and querying across artifacts. It addresses security, performance, deployment topology, and futures like semantic search and integration with on-premise systems. Key points include indexing millions of files in hours, scaling out the indexing pipeline, and supporting cross-account and public repository search.
The document discusses Solr 4, an open source search platform built on Apache Lucene. Some key points:
- Solr 4 is a NoSQL search server that provides distributed indexing, fault tolerance, and real-time search capabilities.
- Solr Cloud is Solr's distributed architecture which uses Zookeeper for coordination to provide features like automatic sharding and replication of indexes across multiple servers.
- The document outlines Solr 4's capabilities including schema-less options, atomic updates, optimistic concurrency, and a REST API for managing the schema dynamically.
Sumo Logic - Optimizing Your Search Experience (2016-08-17)Sumo Logic
The document discusses optimizing searches in Sumo Logic. It covers basic search structure, setting performance expectations, and optimization tools like field extraction rules, partitions, and scheduled views. Field extraction rules extract fields during ingestion to standardize searches and simplify parsing. Partitions divide data to improve search performance by searching smaller chunks. Scheduled views pre-aggregate data to significantly improve performance for selective queries and long-term trend analysis. The document provides recommendations on when and how to use these optimization tools to improve search performance.
This document summarizes best practices for improving ASP.NET performance based on testing with various tools. Key findings include that a DataReader is faster than a DataSet, inline SQL is faster than stored procedures, caching improves performance, and reducing ViewState usage and templates improves speed. The presenter advocates using profiling tools to test performance and recommends strategies like optimizing database queries, caching data, and minimizing unnecessary page elements.
This document summarizes Apache Flink community updates from June 2015. It discusses the 0.9.0 release of Apache Flink, an open source platform for scalable batch and stream data processing. Key points include the addition of two new committers, blog posts and workshops promoting Flink, and various conference and meetup talks about Flink occurring that month. It encourages registration for the Flink Forward conference in October 2015.
Your Big Data Stack is Too Big!: Presented by Timothy Potter, LucidworksLucidworks
Timothy Potter presented at a Big Data conference in Boston from October 11-14, 2016. He discussed how Lucidworks Fusion provides an alternative to traditional big data stacks that emphasizes fast access, agility and automation over integration. Fusion allows for common access patterns like fast lookups, ranked retrieval and distributed scans while integrating technologies like Solr, Spark, HDFS and more. It provides tools for data ingestion, time-based partitioning, analytics, machine learning and more to solve business problems rather than focus on infrastructure.
QuickStart your Sumo Logic service with this exclusive webinar. At these monthly live events you will learn how to capitalize on critical capabilities that can amplify your log analytics and monitoring experience while providing you with meaningful business and IT insights
The document describes a document summarizer platform that can generate summaries from input text or URLs using predefined summarizers. It determines the relevance of the summaries to computer science by passing them to a Word2Vec model. The platform allows developers to easily test different summarizers and choose the most suitable one for their domain based on the calculated relevance scores.
Consuming External Content and Enriching Content with Apache Cameltherealgaston
This document discusses using Apache Camel as a document processing platform to enrich content from Adobe Experience Manager (AEM) before indexing it into a search engine like Solr. It presents the typical direct integration of AEM and search that has limitations, and proposes using Camel to offload processing and make the integration more fault tolerant. Key aspects covered include using Camel's enterprise integration patterns to extract content from AEM, transform and enrich it through multiple processing stages, and submit it to Solr. The presentation includes examples of how to model content as messages in Camel and build the integration using its Java DSL.
How Rackspace Cloud Monitoring uses Cassandragdusbabek
This document summarizes a Cassandra usage example. It describes using Cassandra for a monitoring control (CM) cluster and a separate data cluster. The CM cluster stores metadata and configuration in Cassandra and uses a Node.js API and ORM. The data cluster ingests high-volume time-series metrics data, performs rollups to different granularities (minutes, hours, days), and stores the results in Cassandra for fast retrieval.
The Query Service is the new platform solution for querying a variety of data sources. The goal of Query Service is that administrators can configure a metadata description of the data source that can then be used by end users without detailed knowledge of the underlying data source. This session explains how to configure Query Service data sources and use them with the RESTful API or component collection.
hbaseconasia2019 Phoenix Improvements and Practices on Cloud HBase at AlibabaMichael Stack
Yun Zhang
Track 2: Ecology and Solutions
https://open.mi.com/conference/hbasecon-asia-2019
THE COMMUNITY EVENT FOR APACHE HBASE™
July 20th, 2019 - Sheraton Hotel, Beijing, China
https://hbase.apache.org/hbaseconasia-2019/
This document provides an introduction to enterprise search and its key components. It discusses how search engines work by building indexes on text and answering queries using those indexes. The two main components are indexing, which structures data for easy searching, and search, which returns results based on user queries against the index. It introduces common file formats that can be indexed like text, HTML, PDFs. Lucene and Solr are introduced as open source search libraries, with Solr building on Lucene and adding features like indexing, querying via HTTP, and admin interfaces. The document demonstrates adding, deleting, and searching for documents in Solr.
Journey of Implementing Solr at Target: Presented by Raja Ramachandran, TargetLucidworks
This document summarizes Target's implementation of Solr as its search platform. It discusses how Target transitioned from Oracle-Endeca to Solr to handle its large scale data and enable more flexible relevancy controls. It describes how Target tested Solr through handling live guest traffic in two sprints and moving its typeahead functionality to the public cloud. Finally, it outlines how Target leverages key Solr capabilities like collection aliases, atomic updates, and configurable facets to synchronize designer and product launches.
SharePoint Search Topology and OptimizationMike Maadarani
This document contains a presentation on SharePoint 2013 search topology and optimization. It discusses the search architecture in SharePoint 2010 and 2013, and how the search components like crawl, query processing, and indexing are distributed across servers. It provides guidance on how to configure search topologies for small, medium and large farms based on the number of items and queries per second. It also covers search configuration options like authorities, query rules and the query builder to tune search relevance.
Azure Search is a cloud search service that allows developers to add search functionality to applications. Key features include scalability, powerful querying abilities, scoring profiles, and search navigation options. To use Azure Search, developers first create a search service, then define indexes and documents. Documents are added to indexes which are optimized data structures for search. Queries can be executed against indexes to retrieve relevant documents based on search terms. Results can be filtered and scored using various options in Azure Search.
Presented by Andrzej Bialecki, LucidWorks
This session presents a set of Solr components for easy management of "sidecar indexes" - indexes that extend the main index with additional stored and / or indexed fields. Conceptually this can be viewed as an extension of the ExternalFileField or as a static join between documents from two collections. This functionality is useful in applications that require very different update regimes for the two parts of the index (e.g. main catalogue items combined with clickthroughs).
Columnar Table Performance Enhancements Of Greenplum Database with Block Meta...Ontico
HighLoad++ 2017
Зал «Рио-де-Жанейро», 7 ноября, 13:00
Тезисы:
http://www.highload.ru/2017/abstracts/2923.html
Alibaba built up a data warehouse service named HybridDB in its public cloud service, based on the open sourced Greenplum Database. And it keeps on enhancing HybridDB's preformance. This presentation will talk about how Alibaba improves HybridDB's performance for columnar tables with data block's meta data (MIN/MAX values of block data) and sort keys (pre-defined keys that data will be sorted and stored with). Testing result shows that, block metadata can be generated on-the-fly without much overhead, but can achive better performance even than index scan. With sort keys, a constant response time can be archived for GROUP-BY and ORDER-BY queries.
Simple Fuzzy Name Matching in Solr: Presented by Chris Mack, Basis TechnologyLucidworks
This document describes a custom Solr plugin for fuzzy name matching. The plugin handles challenges like name variations and ambiguity. It creates a custom field type that scores name matches and supports multiple fields and values per document. At query time, it generates a custom Lucene query to find candidates, then uses Solr's rerank feature to rescore the top results based on the name matching algorithm. The plugin is configurable to trade off accuracy versus speed and supports multi-lingual name matching.
Cassandra Day Chicago 2015: Top 5 Tips/Tricks with Apache Cassandra and DSEDataStax Academy
The document provides 5 tips for using Cassandra and DSE: 1) Data modeling best practices to avoid secondary indexes, 2) Understanding compaction choices like size-tiered, leveled, and date-tiered and their use cases, 3) Common mistakes in proofs-of-concept like testing on different hardware and empty nodes, 4) Hardware recommendations like using moderate sized nodes with SSDs, and 5) Anti-patterns like loading large batches of data and modeling queues with improper partitioning.
Taking Splunk to the Next Level - Architecture Breakout SessionSplunk
This document discusses strategies for scaling a Splunk deployment. It begins by describing how customers typically start with a single use case but then need to scale to handle more data and use cases. It then covers strategies for scaling the forwarding, indexing, search, and management components of Splunk. Key topics include load balancing forwarders, using indexer clustering for high availability, scaling search heads by clustering, and using the deployment server and distributed management console for centralized management. The document emphasizes planning storage capacity and I/O when scaling indexers and considering Splunk's application support when scaling search heads.
The document discusses Microsoft's ALM Search service architecture and design. It describes plans for the search indexing and query pipelines, including using Elastic Search for indexing and querying across artifacts. It addresses security, performance, deployment topology, and futures like semantic search and integration with on-premise systems. Key points include indexing millions of files in hours, scaling out the indexing pipeline, and supporting cross-account and public repository search.
Taking Splunk to the Next Level – ArchitectureSplunk
Are you outgrowing your initial Splunk deployment? Is Splunk becoming mission critical and you need to make sure it's Enterprise ready? Attend this session led by Splunk experts to learn about taking your Splunk deployment to the next level. Learn about Splunk high availability architectures with Splunk Search Head Clustering and Index Replication. Additionally, learn how to manage your deployment with Splunk’s operational and management controls to manage Splunk capacity and end user experience.
SQLite is a small, self-contained, zero-configuration, transactional SQL database that requires no setup or administration. It is widely used due to its small size and simplicity, with no server dependency or configuration required. SQLite is ideal for lightweight database needs such as embedded systems and websites, and includes a full-text search engine for indexing and searching large bodies of text.
What is Splunk? At the end of this session you’ll have a high-level understanding of the pieces that make up the Splunk Platform, how it works, and how it fits in the landscape of Big Data. You’ll see practical examples that differentiate Splunk while demonstrating how to gain quick time to value.
The document describes challenges faced when building a search application using Elasticsearch to index and search 6 billion documents. The initial approach of using default shard counts and indexing strategies led to out of memory errors and slow searches. Key problems identified were high field data usage bringing down nodes, searching all indices being slow, and the garbage collector being unable to free enough memory. Improvements involved right-sizing the number of shards, monitoring and reducing field data, targeting specific indices in searches, changing garbage collectors, and dedicating hardware roles.
This document discusses the challenges of managing a multi-instance SQL Server environment and outlines 888 Casino's approach. It describes their architecture with centralized management and data collection. Key areas covered include installations/upgrades, high availability, data retention, maintenance, monitoring, version uploads, and troubleshooting. Automation is emphasized through tools like Object Builder, monitoring with Precise i3, and version upload tools.
This document summarizes Facebook's use of MySQL at web scale. Key points include:
- Facebook has over 800 million monthly active users generating huge volumes of queries and data.
- MySQL is customized with patches and extra resiliency to handle these loads.
- Performance optimizations focus on avoiding stalls and fully utilizing hardware.
- Tools help identify stalls and bottlenecks like table extensions, purge contention, and I/O pressure.
- Memory and disk efficiency are improved through techniques like compact records and flash caching.
- Group commit and admission control were added to MySQL to further optimize high concurrency workloads.
- Ongoing work looks to leverage new hardware, improve replication, and incorporate compression.
Practical SQL query monitoring and optimizationIvo Andreev
Practical SQL query monitoring and optimization
Today the project owners demand results as soon as possible and most often - for yesterday. Time to market is crucial and it is practical to deliver bit-by-bit, get feedback and grow with the number of your customers. But as the project grows, the team does too and not all have the same expertise. As well rarely in the beginning the requirements clear enough to allow performance-wise SQL interaction. In most cases there does not exist an ORM that can solve this task for you and you will need to have hard T-SQL writer in the team. If you already know this story or are going this way then in this practical session we will share how to monitor, measure and optimize your SQL code and DB layer interaction.
Taking Splunk to the Next Level - Architecture Breakout SessionSplunk
This document provides an overview of scaling a Splunk deployment from an initial use case to a larger enterprise deployment. It discusses growing use cases and data volume over time. The agenda covers use case mapping, simple scaling approaches, indexer and search head clustering, distributed management, and hybrid cloud deployments. Best practices are outlined for sizing storage, tuning indexers, and designing high availability into the forwarding, indexing, and search tiers. Clustering impacts on storage sizing and additional hosts are also addressed.
This document discusses using Hadoop to unify data management. It describes challenges with managing huge volumes of fast-moving machine data and outlines an overall architecture using Hadoop components like HDFS, HBase, Solr, Impala and OpenTSDB to store, search, analyze and build features from different types of data. Key aspects of the architecture include intelligent search, batch and real-time analytics, parsing, time series data and alerts.
Search on the fly: how to lighten your Big Data - Simona Russo, Auro Rolle - ...Codemotion
The talk presents a new technique of realtime single entity information extraction and investigation. The technique eliminates regular refresh and persistence of data within the search engine (ETL), providing real-time access to source data and improving response times using in-memory data techniques. The solution presented is a concrete solution with live customers, based upon real business needs. I will explain the architectural overview, the technology stack used based on Apache Lucene library, the accomplished results and how to scale out the solution.
Black Friday and Cyber Monday- Best Practices for Your E-Commerce DatabaseTim Vaillancourt
This document provides best practices for scaling e-commerce databases for Black Friday and Cyber Monday. It discusses scaling both synchronous and asynchronous applications, efficiently using data at scale through techniques like caching, queues, and counters. It also covers scaling out through techniques like sharding, pre-sharding, and kill switches. Testing performance and capacity, as well as asking the right questions at development time are also recommended.
This document provides guidelines for designing dashboards in Tableau for optimal performance. Some key points discussed include:
- Using aggregated data extracts and pre-calculated fields to offload complex calculations from the database to Tableau's local data engine.
- Setting context filters to write filter results to a temporary table for subsequent filters to query against smaller datasets.
- Avoiding slow discrete quick filters and instead using guided analytics, action filters, or custom parameters between views.
- Optimizing calculations by using native features over manual calculations where possible, and minimizing string and date manipulations.
The document discusses SQL Server performance monitoring and tuning. It recommends taking a holistic view of the entire system landscape, including hardware, software, systems and networking components. It outlines various tools for performance monitoring, and provides guidance on identifying and addressing common performance issues like high CPU utilization, disk I/O issues and poorly performing queries.
Michigan Information Retrieval Enthusiasts Group Meetup - August 19, 2010ivan provalov
Two presentation from the Michigan Information Retrieval Enthusiasts Group Meetup on August 19 by Cengage Learning search platform development team.
Scaling Performance Tuning With Lucene by John Nader discusses primary performance hot spots related to scaling to a multi-million document collection. This includes the team's experiences with memory consumption, GC tuning, query expansion, and filter performance. Discusses both the tools used to identify issues and the techniques used to address them.
Relevance Tuning Using TREC Dataset by Rohit Laungani and Ivan Provalov describes the TREC dataset used by the team to improve the relevance of the Lucene-based search platform. Goes over IBM paper and describe the approaches tried: Lexical Affinities, Stemming, Pivot Length Normalization, Sweet Spot Similarity, Term Frequency Average Normalization. Talks about Pseudo Relevance Feedback.
Mapping Data Flows Perf Tuning April 2021Mark Kromer
This document discusses optimizing performance for data flows in Azure Data Factory. It provides sample timing results for various scenarios and recommends settings to improve performance. Some best practices include using memory optimized Azure integration runtimes, maintaining current partitioning, scaling virtual cores, and optimizing transformations and sources/sinks. The document also covers monitoring flows to identify bottlenecks and global settings that affect performance.
MongoDB World 2019: Finding the Right MongoDB Atlas Cluster Size: Does This I...MongoDB
How do you determine whether your MongoDB Atlas cluster is over provisioned, whether the new feature in your next application release will crush your cluster, or when to increase cluster size based upon planned usage growth? MongoDB Atlas provides over a hundred metrics enabling visibility into the inner workings of MongoDB performance, but how do apply all this information to make capacity planning decisions? This presentation will enable you to effectively analyze your MongoDB performance to optimize your MongoDB Atlas spend and ensure smooth application operation into the future.
Ähnlich wie Building the search engine: from thorns to stars (20)
Software Engineering and Project Management - Introduction, Modeling Concepts...Prakhyath Rai
Introduction, Modeling Concepts and Class Modeling: What is Object orientation? What is OO development? OO Themes; Evidence for usefulness of OO development; OO modeling history. Modeling
as Design technique: Modeling, abstraction, The Three models. Class Modeling: Object and Class Concept, Link and associations concepts, Generalization and Inheritance, A sample class model, Navigation of class models, and UML diagrams
Building the Analysis Models: Requirement Analysis, Analysis Model Approaches, Data modeling Concepts, Object Oriented Analysis, Scenario-Based Modeling, Flow-Oriented Modeling, class Based Modeling, Creating a Behavioral Model.
Null Bangalore | Pentesters Approach to AWS IAMDivyanshu
#Abstract:
- Learn more about the real-world methods for auditing AWS IAM (Identity and Access Management) as a pentester. So let us proceed with a brief discussion of IAM as well as some typical misconfigurations and their potential exploits in order to reinforce the understanding of IAM security best practices.
- Gain actionable insights into AWS IAM policies and roles, using hands on approach.
#Prerequisites:
- Basic understanding of AWS services and architecture
- Familiarity with cloud security concepts
- Experience using the AWS Management Console or AWS CLI.
- For hands on lab create account on [killercoda.com](https://killercoda.com/cloudsecurity-scenario/)
# Scenario Covered:
- Basics of IAM in AWS
- Implementing IAM Policies with Least Privilege to Manage S3 Bucket
- Objective: Create an S3 bucket with least privilege IAM policy and validate access.
- Steps:
- Create S3 bucket.
- Attach least privilege policy to IAM user.
- Validate access.
- Exploiting IAM PassRole Misconfiguration
-Allows a user to pass a specific IAM role to an AWS service (ec2), typically used for service access delegation. Then exploit PassRole Misconfiguration granting unauthorized access to sensitive resources.
- Objective: Demonstrate how a PassRole misconfiguration can grant unauthorized access.
- Steps:
- Allow user to pass IAM role to EC2.
- Exploit misconfiguration for unauthorized access.
- Access sensitive resources.
- Exploiting IAM AssumeRole Misconfiguration with Overly Permissive Role
- An overly permissive IAM role configuration can lead to privilege escalation by creating a role with administrative privileges and allow a user to assume this role.
- Objective: Show how overly permissive IAM roles can lead to privilege escalation.
- Steps:
- Create role with administrative privileges.
- Allow user to assume the role.
- Perform administrative actions.
- Differentiation between PassRole vs AssumeRole
Try at [killercoda.com](https://killercoda.com/cloudsecurity-scenario/)
Batteries -Introduction – Types of Batteries – discharging and charging of battery - characteristics of battery –battery rating- various tests on battery- – Primary battery: silver button cell- Secondary battery :Ni-Cd battery-modern battery: lithium ion battery-maintenance of batteries-choices of batteries for electric vehicle applications.
Fuel Cells: Introduction- importance and classification of fuel cells - description, principle, components, applications of fuel cells: H2-O2 fuel cell, alkaline fuel cell, molten carbonate fuel cell and direct methanol fuel cells.
artificial intelligence and data science contents.pptxGauravCar
What is artificial intelligence? Artificial intelligence is the ability of a computer or computer-controlled robot to perform tasks that are commonly associated with the intellectual processes characteristic of humans, such as the ability to reason.
› ...
Artificial intelligence (AI) | Definitio
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024Sinan KOZAK
Sinan from the Delivery Hero mobile infrastructure engineering team shares a deep dive into performance acceleration with Gradle build cache optimizations. Sinan shares their journey into solving complex build-cache problems that affect Gradle builds. By understanding the challenges and solutions found in our journey, we aim to demonstrate the possibilities for faster builds. The case study reveals how overlapping outputs and cache misconfigurations led to significant increases in build times, especially as the project scaled up with numerous modules using Paparazzi tests. The journey from diagnosing to defeating cache issues offers invaluable lessons on maintaining cache integrity without sacrificing functionality.
Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...shadow0702a
This document serves as a comprehensive step-by-step guide on how to effectively use PyCharm for remote debugging of the Windows Subsystem for Linux (WSL) on a local Windows machine. It meticulously outlines several critical steps in the process, starting with the crucial task of enabling permissions, followed by the installation and configuration of WSL.
The guide then proceeds to explain how to set up the SSH service within the WSL environment, an integral part of the process. Alongside this, it also provides detailed instructions on how to modify the inbound rules of the Windows firewall to facilitate the process, ensuring that there are no connectivity issues that could potentially hinder the debugging process.
The document further emphasizes on the importance of checking the connection between the Windows and WSL environments, providing instructions on how to ensure that the connection is optimal and ready for remote debugging.
It also offers an in-depth guide on how to configure the WSL interpreter and files within the PyCharm environment. This is essential for ensuring that the debugging process is set up correctly and that the program can be run effectively within the WSL terminal.
Additionally, the document provides guidance on how to set up breakpoints for debugging, a fundamental aspect of the debugging process which allows the developer to stop the execution of their code at certain points and inspect their program at those stages.
Finally, the document concludes by providing a link to a reference blog. This blog offers additional information and guidance on configuring the remote Python interpreter in PyCharm, providing the reader with a well-rounded understanding of the process.
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...IJECEIAES
Medical image analysis has witnessed significant advancements with deep learning techniques. In the domain of brain tumor segmentation, the ability to
precisely delineate tumor boundaries from magnetic resonance imaging (MRI)
scans holds profound implications for diagnosis. This study presents an ensemble convolutional neural network (CNN) with transfer learning, integrating
the state-of-the-art Deeplabv3+ architecture with the ResNet18 backbone. The
model is rigorously trained and evaluated, exhibiting remarkable performance
metrics, including an impressive global accuracy of 99.286%, a high-class accuracy of 82.191%, a mean intersection over union (IoU) of 79.900%, a weighted
IoU of 98.620%, and a Boundary F1 (BF) score of 83.303%. Notably, a detailed comparative analysis with existing methods showcases the superiority of
our proposed model. These findings underscore the model’s competence in precise brain tumor localization, underscoring its potential to revolutionize medical
image analysis and enhance healthcare outcomes. This research paves the way
for future exploration and optimization of advanced CNN models in medical
imaging, emphasizing addressing false positives and resource efficiency.
Advanced control scheme of doubly fed induction generator for wind turbine us...IJECEIAES
This paper describes a speed control device for generating electrical energy on an electricity network based on the doubly fed induction generator (DFIG) used for wind power conversion systems. At first, a double-fed induction generator model was constructed. A control law is formulated to govern the flow of energy between the stator of a DFIG and the energy network using three types of controllers: proportional integral (PI), sliding mode controller (SMC) and second order sliding mode controller (SOSMC). Their different results in terms of power reference tracking, reaction to unexpected speed fluctuations, sensitivity to perturbations, and resilience against machine parameter alterations are compared. MATLAB/Simulink was used to conduct the simulations for the preceding study. Multiple simulations have shown very satisfying results, and the investigations demonstrate the efficacy and power-enhancing capabilities of the suggested control system.
Comparative analysis between traditional aquaponics and reconstructed aquapon...bijceesjournal
The aquaponic system of planting is a method that does not require soil usage. It is a method that only needs water, fish, lava rocks (a substitute for soil), and plants. Aquaponic systems are sustainable and environmentally friendly. Its use not only helps to plant in small spaces but also helps reduce artificial chemical use and minimizes excess water use, as aquaponics consumes 90% less water than soil-based gardening. The study applied a descriptive and experimental design to assess and compare conventional and reconstructed aquaponic methods for reproducing tomatoes. The researchers created an observation checklist to determine the significant factors of the study. The study aims to determine the significant difference between traditional aquaponics and reconstructed aquaponics systems propagating tomatoes in terms of height, weight, girth, and number of fruits. The reconstructed aquaponics system’s higher growth yield results in a much more nourished crop than the traditional aquaponics system. It is superior in its number of fruits, height, weight, and girth measurement. Moreover, the reconstructed aquaponics system is proven to eliminate all the hindrances present in the traditional aquaponics system, which are overcrowding of fish, algae growth, pest problems, contaminated water, and dead fish.
38. Autosharding
1 2 3 4
Application
Shards
Search though all the
shards
Aggregation of results
Overhead
1 2 3 4
Application
Search though all the
shards
Aggregation of results
Overhead
39. Routing
1 2 3 4
Application
Shards
Execute search on
specified shards
Merge of results takes less
time
Reduce traffic whithin
response
Добрый день. Полагаю, что из многие из нас смотрят сериалы. И часто при просмотре мы слышим фразу «1 икс Бет. Ставки на спорт». Сегодня мы поговорим о ставках, но других!
Я – Андрей Винда. За плечами более 14 лет опыта в разработке ПО. Последние два года я работаю в компании SBTech на позиции ТимЛида.
Давайте поговорим о бизнесе нашей компании.
В каждой стране есть люди, которые хотят заработать деньги, делая ставки на спорт. Мы называем их игроками. А наша компания дает им такую возможность.
Компания работает в двух сферах: B2B и B2C. Своих клиентов компания называет «операторами». Оператор – это владелец сайта ставок.
Существует огромное множество операторов. В нашей компании на текущий момент зарегистрировано боле 250 операторов.
В системе есть два вида пользователей:
Агенты
Игроки
Агенты – это представители операторов, которые имеют возможность просматривать разного вида отчеты, информацию по игрокам, поиск игроков по разнообразным параметрам и их комбинациям.
С другой стороны есть игроки, которые заходят на сайт, просматривают события, делают ставки, изменяют свою информацию и так далее.
Я расскажу вам какой поисковый движок мы выбрали, как организовали постоянный поток данных, с какими трудностями столкнулись и как пришли к рабочей версии.
Как 2 года назад был организован поиск игроков.
Это была грусть-печаль!
А мы имели мы следующее.
Примитивный графический интерфейс, где фильтры были беспорядочно добавлены и размещены.
Весь поиск производился силами MS SQL.
Из-за этого у нас были следующие проблемы при поиске.
Полнотекстовый поиск крайне медлителен (LIKE) и возможен не для всех полей
При указании периода поиска 6 месяцев и более – система работала стабильно и предсказуемо! Она зависала и выдавала ошибку: Timeout.
Это было вследствие того, что система была вынуждена произвести фильтрацию среди более чем 20 миллионов записей.
Скорость поиска низкая и ВСЕГДА зависит от нагрузки на БАЗУ!
Далее.
Главные сложности и ограничения реляционных БД.
Агрегация на лету
JOINS
Масштабируемость (можно, но сложно и дорого)
Такая система была неконкурентоспособна.
Поэтом вместе с бизнесом были сформированы следующие требования.
Одно поле ввода – поиск по многим полям
Полнотекстовый поиск по всем текстовым полям
Ускорить поиск
Возможность задания больших периодов
Что же тут главное.
Первое, Масштабируемость.
Второе, поиск должен быть очень быстрым
Третье, возможность указания больших периодов (более 2-х лет)
И последнее, Не Облачное решение.
Этот пункт связан с особенностью бизнеса. По требованиям многих регуляторов, беттинговые системы должны хоститься в стране, в которой они работают.
Ну ладно, требования у нас есть. С чего начать?
Итак, нам нужен супер быстрый поисковой движок, который из коробки поддерживает полнотекстовый поиск, масштабируемость, простые запросы без JOINS
Мы сразу же остановили свой взгляд на Эластике, т.к. это фактически стандарт в мире поисковых систем.
Даже рейтинг поисковых систем показывает, что Эластик - впереди планеты всей.
Elasticsearch используют такие компании, как Netflix, StackOverflow, LinkedIn, Barclays, Facebook и многие другие
Вот его основные возможности:
Масштабируемость и отказоустойчивостьElasticsearch действительно легко масштабируется. К уже имеющейся системе можно на ходу добавлять новые сервера, и поисковый движок сможет сам распределить на них нагрузку. При этом данные будут распределены таким образом, что при отказе какой-то из нод они не будут утеряны и сама поисковая система продолжит работу без сбоев.
В Elasticsearch есть огромное количество настроек, с помощью которых можно увеличить производительность элатика при поиске, фильтрации и агрегации
Elasticsearch практически полностью управляется по HTTP с помощью запросов в формате JSON
Рассмотрим вкратце структуру Эластика
Есть кластер, состоящий из нод.
Каждая нода – это сервер, на котором запущен Elasticsearch.
Каждая нода состоит из шардов.
Шард – это фактически инвертированный индекс Lucene.
Зная теперь, что за зверь этот Elasticsearch мы начали разработку.
Так как любой продукт встречают по одежке, то мы решили обратить наше внимание на очень важный момент. А именно, на Визуальный интерфейс. Он был ужасен!
Мы взялись за его переделку и вот что вышло!
Для удобства использования наверх были вынесены самые часто используемые фильтры, а ниже все фильтры сгруппированы по категориям.
Также Smart Search – это как раз то самое поле, значение которого ищется сразу по нескольким полям (имеется ввиду вхождение или полное совпадение)
Теперь у пользователя системы есть возможность задания любых фильтров
в любых комбинациях.
Теперь давайте посмотрим, как изменилась структура поисковой системы
Мы использовали денормализированный тип отношений,
всего у нас был 1 индекс, в котором было более 130 полей.
Было оставлено автошардирование,
а индексация проходила в 5 потоков с небольшим временным зазором между каждым.
Конфигурация кластера была следующая.
Это конфигурация Эластика по умолчанию. У нас 3 ноды, каждая имеет 8 Gb оперативной памяти, 100 Gb дискового пространства и 4 ядра.
Шардов всего 15.
Наполнение данных было устроено весьма просто.
Взяли данные из базы и если хотя бы одно из полей в таблице было изменено - отправляли их в Эластик.
Процесс индексации был построен на базе нашего собственного планировщика задач.
При разработке планировщика были использованы следующие технологии.
А используются они следующим образом.
RabbitMQ – канал коммуникации
Quartz.NET – запуск задач по расписанию
Dapper – легковесная ORM для чтения данных из БД
Nest – официальный .NET клиент для работы с Elasticsearch
Давайте рассмотрим схему работы планировщика.
Конфигурацию всех задач храним в отдельной базе
Задачи запускаются по расписанию (Quartz.NET)
Планировщик общается с исполнителями через RabbitMQ
Схема работы перекачки данных выглядит достаточно просто. А именно.
Получаем данные
Разбиваем их на пакеты
Отправляем пакеты в Эластик
И так, пока не перегоним все данные.
Наше решение прошло тестирование. Все работало как положено, и мы решили идти на продакшн
Все работало как часы. Но ровно 2 месяца
Потом случилась беда!
На сервере Эластика закончилось место.
Счет шел на минуты. Мы отключили индексацию на STG, чтобы выиграть немного времени.
Работа системы была под угрозой. В любой момент все могло рухнуть. Слава Богу, что не рухнуло!
Начинался трудный путь к успеху.
Никто из нас не знал, что делать. Единственный выход – освоить теорию.
Чем мы с вами сейчас и займемся.
Так как Эластик основан на Lucene, то давайте рассмотрим следующие его особенности.
Индекс состоит из множества сегментов.
Сегмент – это неизменяемая единица
В Lucene есть всего две операции – создание нового документа и удаление старого
Хотя на самом деле вместо удаления документа соответствующие сегменты помечаются как удаленные. При этом они физически занимают место и память, но не участвуют в поиске!
Когда сегменты занимают в памяти максимально позволенный объем (MergeFactor) – запускается процедура слияния сегментов.
Идеально иметь один сегмент! Таким образом отпадает необходимость объединять и ранжировать результаты с нескольких сегментов.
Основываясь на этих фактах, были определены допущенные нами основные ошибки.
Это:
Огромный размер индекса
Частые обновления данныхПроблема заключается как раз в том, что документы в этом индексе часто изменяются. Это приводит к большому количеству удаленных сегментов и занимаемой при этом памяти. О скорости поиска при таком раскладе говорить не приходиться.Эластик не предназначен для частых изменений данных, но ищет он все равно очень быстро.
Поиск сразу по всем шардамэто вследствие того, что мы использовали автошардирование.
Начался поиск путей решения!
Что же можно сделать с таким большим размером индекса?
Каким-то образом его надо разбить на несколько. Чтобы определить варианты изменения индекса, посмотрим какие же типы отношений между объектами предлагает Эластик.
Денормализированные
Вложенные
Родитель – Ребенок
На уровне приложения
Проанализировав каждый тип, мы остановились на Родитель – Ребенок.
Он давал нам следующие преимущества.
Во-первых, при изменении структуры одного типа необходимо переиндексировать документы только этого типа.
Во-вторых, можно оптимизировать поисковый запрос, указав конкретные типы для поиска.
В-третьих, возможность параллельной индексации всех или нескольких типов.
В-четвертых, при частых изменениях документов имеем меньший размер удаленных сегментов
Используя этот тип отношений, структура поискового индекса изменилась следующим образом
Название нашего индекса PlayerData. И в этом индексе несколько типов: General, Lifetime, Sensitive и Personalization.
Родитель в данном случае – это General, а остальные являются его детьми
Также мы занялись оптимизацией поиска и вот что сделали.
Т.к. у нас сортировка всегда происходит по идентификатора игрока, а не по высчитываемому Elastic’ом рейтингу, то мы перешли от Query к Filter.
Это позволило нам помочь Эластику НЕ делать лишних движений.
Итак, поиск мы немного улучшили. Но можно ли сделать, что-то еще. Оказывается да.
Шардирование как раз и является волшебной пилюлей.
При встроенном шардировании, когда ElasticSearch обрабатывает поисковый запрос, то он не знает на каких шардах стоит искать и потому производит поиск на всех шардах. После этого результаты поиска со всех шардов сливаются, сортируются и выдаются в качестве результата. При таком подходе накладные расходы могут легко повлиять на производительность. Если же при выполнения поискового запроса указать Elasticsearch на каких шардах производить поиск – то можно существенно уменьшить накладные расходы.
Для ускорения работы поиска было решено использовать собственный аргумент шардирования. В нашем случае им стал идентификатор оператора.
Так как при поиске мы всегда указываем конкретных операторов, то данное решение выглядит весьма логичным. При таком подходе Эластик будет производить поиск только на указанных шардах.
При собственном шардировании возникает одна ситуация.
Из-за того, что мы распределяем игроков по их принадлежности к оператору, может так выйти, что на каком-то шарде данных больше, чем на других.
Такое может произойти, если игроки двух или более больших операторов будут помещены в один шард.
Такую возможность надо держать в уме.
И при наступлении критического размера это можно будет решить двумя способами:
Увеличении размера диска
Добавление в кластер новых нод
Нам оставалось решить еще несколько проблем.
Во-первых, что делать, когда игрок меняет оператора? Из-за того, что Эластик не позволяет изменить для созданного документа шард был создан специальный исполнитель, который обнаруживал таких игроков и удалял их из старых шардов, а потом добавлял данные игрока на новые шарды.
Во-вторых, как быстрее избавиться от удаленных сегментов?У Эластика есть специальная команда, когда начинает процесс слияния сегментов.
Не поверите, но она называется optimize
Мы пользуемся ей с завидной регулярностью.
Теперь наполнение Эластика выглядит следующим образом.
Вроде все хорошо, но есть одно НО.
Как уменьшить поток данных и отправлять в Эластик данные, которые действительно изменились?
Надо было решить проблему с частыми изменениями данных.
Совсем избавиться от частых изменений мы не могли.
Хранить данные с учетом временного фактора – мы не могли, т.к. данные изменяются постоянно, но предугадать это невозможно.
Как уменьшить поток данных и отправлять в Эластик данные, которые действительно изменились?
Для этих целей мы создали новый алгоритм, который позволяет нам определять действительно ли изменились данные у игрока, которые мы храним в Эластике.
Для этого мы вычисляем ContentHash на основании полученных данных игрока.
Если вычисленный хеш совпадает с уже отправленными в Эластик данными – то они исключаются из пакета.
После проверки данных по всем игрокам, данные которых изменились, пакет отправляется в Эластик.
Если пакет принят успешно, то вычисленный Хеш сохраняется как последний отправленный по игроку.
Таким образом в Эластик отправляются данные, которые действительно нужно там изменить.
Как же можно понять, что наша система будет в работоспособном состоянии по прошествии нескольких дней, недель, месяцев.
Для этих целей нам подойдет постоянный мониторинг показателей нашей поисковой системы.
Какие же это показатели?
Все показатели мы разделили на несколько уровней, чтобы в случае проблемы понимать, куда бежать и что делать.
Давайте рассмотрим каждый из уровней.
Нижний уровень мониторинга — железо и базовые метрики, такие же, какие собираются с любого сервера. А именно:
Загрузка процессорных ядер;
Использование памяти;
Пинг до сервера и время отклика;
i/o по дисковой подсистеме;
Остаток свободного места на дисках
Уровень повыше, но мониторинг всё такой же стандартный:
Количество запущенных процессов сервиса elasticsearch;
Используемая сервисом память;
Пинг до порта приложения (стандартные порты elasticsearch/kibana — 9200/9300/5601).
Если любая из метрик упала в ноль — это, означает что приложение упало, либо зависло, и немедленно вызывается алерт.
Общие метрики состояния кластера. Самые важные из них это:status — принимает одно из значений: green/yellow/red. Green — всё хорошо; yellow — какие-то шарды отсутствуют/инициализируются, но оставшихся кластеру достаточно, чтобы собраться в консистентное состояние; red — всё плохо, каким-то индексам не хватает шардов до 100% целостности, беда, трагедия, алерт.Общее количество нод в кластере. Полезно мониторить их изменение, потому что иногда случаются ситуации, когда какая-то из нод залипла под нагрузкой и вывалилась из кластера, но потребляет ресурсы и держит порт открытым. Влияет на целостностность кластера.
Количество не назначенных шард. Значение метрики не равное нулю — это очень плохой признак. Либо из кластера выпала нода, либо не хватает места для размещения, либо какая-то другая причина и нужно незамедлительно разбираться.
Общие метрики состояния ноды. Самые важные из них это:
Память. Elasticsearch хранит в оперативной памяти каждой дата-ноды индексную часть каждого шарда, принадлежащего этой ноде для осуществления поиска. Регулярно приходит сборщик и очищает неиспользуемые пулы памяти. Через некоторое время, если данных на ноде много и они перестают помещаться в память, сборщик выполняет очистку всё дольше и дольше, пытаясь найти то, что вообще можно очистить, вплоть до полного stop the world. А из-за того, что кластер Elasticsearch работает со скоростью самой медленной дата-ноды, залипать начинает уже весь кластер. Есть еще одна причина следить за памятью —после 4-5 часов в состоянии jvm.mem.heap_used_percent > 95% падение процесса становится неизбежным.
Файловая система: метрики по дисковому пространству, доступному каждой ноде. Если значение приближается к watermark.low — аларм.
Пулы очередей: стоит особо отметить отказы на добавление данных. Рост этого показателя — очень плохой признак, который показывает, что эластику не хватает ресурсов для приёма новых данных. Бороться, без добавления железа в кластер, сложно
Теперь же, конфигурацию Эластика мы определил сами.Увеличили память и место, что было с запасом.
Количество шардов рассчитали по формуле 1 Шард = 1 Ядро.
Изменения, все вместе взятые, дали заметный прогресс.
Время открывать шампанское и отмечать успех!
Что же обеспечило успешный результат?
Целостность данных
В нашем случае это был набор задач, которые регулярно выполнялись и делали следующие действия:
Непрерывный импорт данных
Удаление данных при изменении параметра шардирования
Индексация или поиск
Поиск важен. Но индексация важнее. Без новых / измененных данных поиск будет приносить больше вреда, чем пользы.
Т.к. задачи по расписанию запускаются каждые 3 минуты, то имеет смысл новые / измененные данные адаптировать для поиска.
Изменение структуры индекса
Шардирование
Регулярный запуск слияний сегментов
Заточка на индексацию
1 Шард на 1 Ядро
Настройка по умолчанию для Elasticsearch может сыграть злую шутку с вами. Когда Elastic настроен по умолчанию – то кажется что все отлично работает. В этом основное отличие от других систем, где сразу видны проблемы при недостаточной настройке. Elastic же работает до поры до времени, а потом приходит боль!
Мониторинг! Это очень важно!
Тренироваться, прогонять настройку системы в течение длительного времени при большой нагрузке, чтобы понимать, готова ли система к таким нагрузкам.
Как не надо делать:
Мы использовали единственный индекс, в котором определили более 130 полей. Документы в индексы часто изменялись. Как следствие – система рухнула. Мораль: Знание основ работы системы – must have.
Мы не управляли настройкой системы и составом кластера.
Даже во время подготовки к презентации были найдены новые пути для улучшения. Так что процесс оптимизации и улучшения бесконечный!
Первым шагом для нас станет добавление, так называемых, balancer nodes в Elasticsearch. Они могут производить агрегирование результатов запросов по другим шардам, у них никогда не будет перегружен IO, так как они не выполняют чтения и записи на диск, и мы разгрузим наши data nodes.
Оптимизация настроек индексов:
Тип хранения данных
Размер буфера памяти
Переход на Elasticsearch 6.0
================================
index.store.type по умолчанию ставится в niofs, а по бенчмаркам производительность ниже чем у mmapfs
indices.memory.index_buffer_sizeувеличить до 30%, а количество RAM под Java Heap наоборот уменьшить до 30%, так как с mmapfs нужно намного больше оперативки для кеша операционной системы
Редкие значения
Когда не все поля в индексе имеют заполненные значения, то место на диске и в кеше будет зарезервировано для таких пробелов. Изменения в Lucene 7 поддерживают такие ситуации и новый формат кодирования уменьшает занимаемое место и увеличивает пропускную способность запросов.
Сортировка при индексации
Lucene 7 также позволяет определить сортировку при индексации. Это повышает производительность, позволяю сортировать индексы при индексации во время записи, а не во время чтения. Индексы записываются на диск в определенном заранее порядке.
Улучшенное восстановление шарда
Новая функция, называемая Sequence IDs, обещает гарантировать более успешное и эффективное восстановление шардов.
Каждая операция индексирования, обновления и удаления получает идентификатор, который регистрируется в журнале транзакций основного шарда. После этого реплика может ссылаться на операции, записанные в этом журнале и использовать их для обновления без необходимости копирования всех файлов, что значительно ускоряет восстановление. Есть возможность настраивать значение того, как долго хранить эти журналы транзакций.
Реплики могут запускать неподтвержденные и разные операции - это означает, что в случае сбоя первичного шарда реплики смогут синхронизироваться с новым основным шардом, не дожидаясь следующего восстановления.