Multi-tiered Query Aggregation for Social Network Latency

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Social networking sites face inefficiencies in information retrieval due to 'fan-out' distribution of data across thousands of servers, leading to query latency and delays, which can frustrate users with perceptible page loading times.

Innovation Solution

A multi-tiered targeted query system organizes servers into a web tier, an aggregator tier, and a shards tier, where the aggregator tier determines which shards have requested information, formulates queries, and aggregates results, reducing the number of queries needed by grouping data based on user relationships and using parameters like minimum user counts or percentages to optimize data retrieval.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Quantity of substance

If data is distributed across thousands of servers using fan-out, then information can be stored and accessed by multiple servers, but query latency increases and page loading becomes perceptibly slow

Engineering Contradiction:
Improvedata distribution capacityVSAvoidquery latency
Core Design Contradiction:
Quantity of substanceVSLoss of time

Solution Approach 1:

The system segments the distributed server infrastructure into three distinct tiers: web tier servers handling user requests, aggregator tier servers coordinating queries, and shard tier servers storing data. This segmentation allows queries to be routed through aggregators that can efficiently distribute and aggregate results, reducing the time penalty of data distribution while maintaining high storage capacity across thousands of servers.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The aggregator tier acts as an intermediary between web tier servers and shard tier servers. Aggregators receive query requests, determine which shards contain relevant data, formulate targeted queries, and aggregate results before returning them to web servers. This intermediary layer eliminates the need for web servers to directly query thousands of shards, significantly reducing query latency while preserving the benefits of distributed data storage.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Loss of information

If multiple queries are executed for each page to gather information about hundreds or thousands of users, then comprehensive information can be retrieved, but the complexity of server software increases

Engineering Contradiction:
Improveinformation completenessVSAvoidserver software complexity
Core Design Contradiction:
Loss of informationVSDevice complexity

Solution Approach 1:

The query processing complexity is segmented and relocated to the aggregator tier. Instead of complex query coordination logic distributed across all servers, the aggregator servers specialize in formulating and managing multiple shard queries, while web servers handle user interface logic and shard servers handle data storage. This segmentation reduces software complexity at each individual server while maintaining comprehensive information retrieval capability.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

Aggregator servers perform multiple functions: receiving queries from web tier, determining relevant shards, formulating optimized queries for those shards, collecting results, and aggregating final responses. This multi-functionality consolidates complex query coordination logic into specialized servers, reducing the complexity burden on web servers and shard servers while ensuring complete information retrieval.

Inventive Principle:
Principle #6Universality (Multi-functionality)

3Productivity

If queries are distributed across thousands of servers, then data can be accessed from multiple locations, but various latencies are experienced during query execution

Engineering Contradiction:
Improvedata access capabilityVSAvoidquery execution time
Core Design Contradiction:
ProductivityVSLoss of time

Solution Approach 1:

The aggregator tier performs preliminary actions by determining which specific shards contain relevant data before executing queries. Instead of broadcasting queries to all thousands of servers, aggregators pre-filter the target shards based on the query requirements and data distribution knowledge. This preliminary filtering action maintains high data access capability across distributed servers while eliminating the latency of querying irrelevant servers.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The system executes queries to only the necessary subset of shards rather than all distributed servers. Aggregators determine the minimal set of shards that contain the required information and formulate queries only for those shards. This partial action approach maintains comprehensive data access capability while significantly reducing query execution time by avoiding unnecessary server communications.

Inventive Principle:
Principle #16Partial or excessive action

Data Source

PatentUS10229155B2Multi-tiered targeted querying
Publication Date: 2019.03.12 META PLATFORMS INC
  • US10229155B2 patent drawing
  • US10229155B2 patent drawing
  • US10229155B2 patent drawing

AI summary

Technology is disclosed for a multi-tiered querying system to target queries to systems storing data relevant to the query. A multi-tiered targeted query system comprises at least three tiers: a web tier, an aggregator tier, and a shards tier. Servers at the web tier can be configured to service user data requests and pass them to servers at the aggregator tier. Servers at the aggregator tier can be configured to determine which selected shard servers have the requested information; formulate queries for the selected shard servers; send the queries to the selected shard servers; and aggregate results from the selected shard servers. Servers at the shard tier can be configured to store data, receive queries on that data, and return results for received queries.