a customized approach to http proxy caching in ruby

Post on 13-Jan-2017

241 Views

Category:

Technology

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Perry Carbone

Github: github.com/perrycarboneTwitter: @perrycarbone

A Customized Approach to HTTP Proxy Caching in Ruby

An HTTP proxy caching gem for Rack-based Ruby applications

https://github.com/acorncache/acorn-cache

Co-Authors: Perry Carbone; Vince Devendra

The Goals of HTTP Caching

Decrease page load times and the burden on your server

Two Types of HTTP Caching

Client (Browser) Caching

Internet

Web Server

Cached data stored here

Proxy Caching

Internet

Application Server

Cached data stored here

Proxy Cache Server

Where Does AcornCache Fit In?

Internet

Client Client Client

Middleware Stack ExampleIncoming Request

AcornCache

Middleware 2

Middleware 3..n

Application

Outgoing Cached Response

Server Response

Request

Middleware Stack ExampleIncoming Request

AcornCache

Middleware 2

Middleware 3..n

Application

Outgoing Server Response

Server Response

Request

Why Did We Build It?

+

=

Does it Work?

Does it Work?

Does it Work?

Complexity

Request Time

With Acorn Cache

Without AcornCache

Getting Started

CACHE ALL THE THINGS!

What to Cache With?

Rack::AcornCache

Cached Response

Server Response Request

Initial Object Model

Respecting Cache Control Headers

This should be easy, right?

Rack::AcornCache

Expanded Object Model

Cache Controller

Cache Maintenance

Cached Response

Cache Control Header

Server Response

Cache Control Header

RequestCache Control

Header

Thinking About Thread Safety

Exception Handling

Because SometimesThere Are Unforeseen

Complications

Exception Handling

Allowing for Customization

Implement Page Rules

Pure Ruby FTW

Future Plans

An HTTP proxy caching gem for Rack-based Ruby applications

https://github.com/acorncache/acorn-cache

Please Contribute!

Perry Carbone

Github: github.com/perrycarboneTwitter: @perrycarbone

Email: perrycarb@gmail.com

Looking for Work!

top related