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

Web-content management tool #528

Open
krizhanovsky opened this issue May 26, 2016 · 1 comment
Open

Web-content management tool #528

krizhanovsky opened this issue May 26, 2016 · 1 comment
Assignees
Milestone

Comments

@krizhanovsky
Copy link
Contributor

krizhanovsky commented May 26, 2016

Web-content is stored in TDB with tdbq interface. So a simple program is required to load arbitrary file to TDB using particular URI path, Content-Type, Last-Modified and ETag values generation. The script must be able to compress and load content in different compressed formats (so support of Vary/#508 is required). Also it should be able to extract web-content from TDB by particular URL to a file.

The same tool should be able to add Web content by URI/host/etc, inspect it (i.e. represent in nicer view than tdbq does it in it's raw format), delete or update, so it depends on #279 (TDB: full select, insertion and deletion of binary data from tdbq). In particular multi-oobject cache purging regular expressions must be supported. This is much flexible than current PURGE request scheme, since it can purge cache entries by content type, modification time, domain (vhost), wildcards etc. Probably TDB index must be updated to use Particia trie for efficient pattern matching over the cache tree.

Since the tool must be able to operate with TfwCacheEntry it has sense to develop it in C++ to be able to include kernel source file. Also it should be assumed to be able to load very large existing file system hierarchies of existing Web sites into Tempesta, so performance matters and that's one more point to do this in low level language instead of Perl/Python scripting. Probably, it should be separated from tdbq tool.

In future the tool must have RESTful inteface, so current PURGE scheme (#501) has no sense and should be removed. The tool also can be extended by Web page optimization stuff like minifying CSS, HTML or JS. This work can be run in separate daemon.

TBD: This issue doubles #471 and #66 as it provides third access method to web data. Probably we should just provide io_uring interface to request mmaped data from TDB and in this way it might also relate to #77.

Automatic Platform Optimization

CloudFlare provides APO which seems just an automatic population of changed content into the cache, i.e. instead of purging content on update, they immediately update the web cache. Very similar set of features is provided by the LiteSpeed WordPress plugin. This task will be easily done with the web-content tool. We can do not only web cache population, but also optimizations such as content minification.

Basically, the APO can be easily implemented using wget -r <domain_name>, probably with generated headers according to the web server settings for Vary values. However, in more advanced (heavy loaded) case wget requires to transfer response bodies and process them on the wget side. This is not wished and the Tempesta tool should send some header or introduce a specific method (this requires the Tempesta FW update) to make Tempesta FW just cache the responses and return only status code, without unnecessary headers and body.

Moved to a separate issue #1516

@krizhanovsky krizhanovsky added this to the 0.5.0 Web Server milestone May 26, 2016
@krizhanovsky krizhanovsky self-assigned this Feb 27, 2017
@krizhanovsky krizhanovsky changed the title Web-content loading Web-content management May 15, 2017
@krizhanovsky krizhanovsky changed the title Web-content management Web-content management tool May 15, 2017
@krizhanovsky krizhanovsky modified the milestones: 1.0 Web Operating System, 0.9 Web server Jan 14, 2018
@krizhanovsky
Copy link
Contributor Author

krizhanovsky commented Sep 2, 2018

The task must also consider instant cache migration from other Web accelearators in case if Tempesta FW is introduced into an infrastructure just to mitigate a DDoS attack.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant