Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 31 lines (21 sloc) 1.196 kB
7dfa755 Added readme to explain myself
Tobias Lütke authored
1 = API Proxy
e9998ed @tobi First checkin
authored
2
7dfa755 Added readme to explain myself
Tobias Lütke authored
3 Proxy server that's supposed to be accelerate remote calls in Shopify.
e9998ed @tobi First checkin
authored
4
7dfa755 Added readme to explain myself
Tobias Lütke authored
5 Inspired by Ilya Grigorik's inspired piece of work on EM based proxies:
e9998ed @tobi First checkin
authored
6
7dfa755 Added readme to explain myself
Tobias Lütke authored
7 http://www.igvita.com/2009/04/20/ruby-proxies-for-scale-and-monitoring/
e9998ed @tobi First checkin
authored
8
9
7dfa755 Added readme to explain myself
Tobias Lütke authored
10 == Overview
11
12 Shopify forwards web requests to many remote locations for API
13 apps. Api apps roughly work like facebook applications in the
14 sense that the web requests arrives at Shopify's door but then
15 needs to be forwarded to an arbitrary proxy endpoint.
16
17 If we would do these remote calls within the rails code we would
18 quickly run out of mongrels even if one of the backend services
19 would be slow.
20
21 This proxy server will check memcached for the endpoint URL
22 and - if present - perform the HTTP request. After the http request
23 is successfully completed it will stick the result into memcached
24 and set two headers X-Proxy-Status and X-Proxy-Content before sending
25 the request Shopify for further processing (liquid).
26
27 == Licence
28
29 This code is protected by the fact that it solves a proprietary problem.
30 I hope it can serve as an example for people solving similar issues and I
31 hope it will further the excellent discussion that Ilya kicked off.
Something went wrong with that request. Please try again.