Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TDB secondary index #733

Open
krizhanovsky opened this issue May 15, 2017 · 0 comments
Open

TDB secondary index #733

krizhanovsky opened this issue May 15, 2017 · 0 comments
Assignees
Labels
cache crucial enhancement TDB Tempesta DB module and related issues
Milestone

Comments

@krizhanovsky
Copy link
Contributor

krizhanovsky commented May 15, 2017

Seconday indexes

Issues #508 (Cache secondary keys with Vary) and #731 (Multi-layer firewall) actually require secondary index (for Vary headers and each filtered HTTP header correspondingly). In fact there could be any number of secondary indexes (imagine a filtering rule with many HTTP headers). Exact design is TDB, but secondary index, as opposed to traditional DBMSes, can be implemented as HTrie's subtree (e.g. a simple heap) directly placed in a HTrie's bucket. The features (issues) mentioned above must be reworked in context of the change.

See secondary indexed data size quotas in #515 to limit Vary impact on the CDN node cache.

Primary index

The current HTrie allows either to purge content by specific key (single web page) or fully, but purging content on a query like `curl -X PURGE -D – "https://www.tempesta-tech.com/blog/*" would be an issue - we have to scan the whole database.

It seems we need another index for web content, probably patricia tree will work much better. It also allows to grow the index by 2ndary, 3rdly etc. indexes almost infinitely. (Do we need to save in the index which data it actually stores, e.g. Host, Uri, a vary header(s)?) Probably plugable indexes from #516 should be done in this task.

Spatial indexes

Some use cases require several primary indexes, e.g. the cache can be purged by URL and by Vary, e.g. to purge all French language resources for a particular vhost.

@krizhanovsky krizhanovsky added this to the 1.0 WebOS milestone May 15, 2017
@krizhanovsky krizhanovsky modified the milestones: backlog, 0.8 TDB v0.2 Mar 9, 2018
@krizhanovsky krizhanovsky added TDB Tempesta DB module and related issues and removed performance labels Apr 27, 2020
@krizhanovsky krizhanovsky self-assigned this Apr 27, 2020
@krizhanovsky krizhanovsky modified the milestones: 0.8 - TBD, 1.1 - TLS 1.3 Jan 3, 2022
@krizhanovsky krizhanovsky changed the title [TDB] secondary index TDB secondary index Jan 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cache crucial enhancement TDB Tempesta DB module and related issues
Projects
None yet
Development

No branches or pull requests

1 participant