PowerDNS backend for RGW » History » Version 1
Jessica Mack, 06/22/2015 03:23 AM
1 | 1 | Jessica Mack | h1. PowerDNS backend for RGW |
---|---|---|---|
2 | |||
3 | h3. Summary |
||
4 | |||
5 | When using multiple RGW regions it's hard to direct traffic to the correct region. If a region receives a request which is for a different region it will answer with a 301 HTTP redirect, but this adds extra TCP and HTTP traffic which increases latency. |
||
6 | Wrong configuration on the users end could also lead to additional HTTP traffic on a region since it's only responding with 301s instead of serving objects. |
||
7 | |||
8 | h3. Owners |
||
9 | |||
10 | * Wido den Hollander (Owner) |
||
11 | * Name (Affiliation) |
||
12 | * Name |
||
13 | |||
14 | h3. Interested Parties |
||
15 | |||
16 | * Name (Affiliation) |
||
17 | * Name (Affiliation) |
||
18 | * Name |
||
19 | |||
20 | h3. Current Status |
||
21 | |||
22 | Only an idea, but could be turned into code rather quickly. |
||
23 | Will start with a PoC which won't perform rather well, after that a better version can be written. |
||
24 | Update: POC written and available as Gist on Github: https://gist.github.com/wido/7664859 |
||
25 | |||
26 | h3. Detailed Description |
||
27 | |||
28 | A backend for PowerDNS could solve this where the DNS server answers with a different CNAME depending in the bucket in the hostname. |
||
29 | The backend has to be aware of the regions and buckets to be able to direct traffic. |
||
30 | For example, a setup has two regions with each their own endpoint: |
||
31 | _*US*: o.myobjectstore.us_ |
||
32 | _*EU*: o.myobjectstore.eu_ |
||
33 | _*Global*: o.myobjectstore.com _ |
||
34 | Bucket _'foo'_ is in the region US and bucket _'bar'_ in the EU. |
||
35 | The DNS server will respond like this: |
||
36 | foo.o.myobjectstore.com CNAME foo.o.myobjectstore.us |
||
37 | bar.o.myobjectstore.com CNAME bar.o.myobjectstore.eu |
||
38 | This can be achieved the the "Remote Backend" support from PowerDNS: http://doc.powerdns.com/html/remotebackend.html |
||
39 | |||
40 | To improve performance of the backend for PowerDNS the "Agent" will query the REST Admin API of the RGW. |
||
41 | If that doesn't satisfy the user he/she can put something like Varnish in between to cache HTTP calls and speed up the performance even more. |
||
42 | |||
43 | h3. Work items |
||
44 | |||
45 | h4. Coding tasks |
||
46 | |||
47 | # Write HTTP backend for PowerDNS (Using the RGW REST Admin API) |
||
48 | # Write a VCL for Varnish |
||
49 | # Implement cache invalidation on bucket removal |
||
50 | |||
51 | h4. Build / release tasks |
||
52 | |||
53 | # Create new DEB and RPM package |
||
54 | # Task 2 |
||
55 | # Task 3 |
||
56 | |||
57 | h4. Documentation tasks |
||
58 | |||
59 | # Document on how to set up the remote backend and configure it |
||
60 | # Task 2 |
||
61 | # Task 3 |
||
62 | |||
63 | h4. Deprecation tasks |
||
64 | |||
65 | # Task 1 |
||
66 | # Task 2 |
||
67 | # Task 3 |