burninator 0.1.0 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +25 -11
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8a6ca0ca25b3ae4925d62f5f8e97600f3b511a22
|
4
|
+
data.tar.gz: dac893d8b389c01ccb5f6b3bc8ce899afba60f48
|
5
5
|
!binary "U0hBNTEy":
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 366d9b17837694c64a3c4181350313c226dc64e59289f21e3e41cbdc96d1e41f11b6a403fbaa2e8c61202578ab2866de83edfd05df465d2f0ff81c0fb82343c2
|
7
|
+
data.tar.gz: 77e21271cf69f65aca1f43eae570f0d588a834a1324134f40d9a0d84eb3732a8640543a1c2f454f2f8a640a387af31fc0a8fcb35dc7d17f39952cf3b8a982b6c
|
data/README.md
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
# burninator
|
2
2
|
|
3
3
|
[![Code Climate](https://codeclimate.com/github/jpignata/burninator.png)](https://codeclimate.com/github/jpignata/burninator)
|
4
|
+
[![Build Status](https://travis-ci.org/jpignata/burninator.png)](https://travis-ci.org/jpignata/burninator)
|
4
5
|
[![Gem Version](https://badge.fury.io/rb/burninator.png)](http://badge.fury.io/rb/burninator)
|
5
6
|
|
6
7
|
### Status: Beta (Caveat Utilitor)
|
@@ -17,42 +18,55 @@ caches are cold you're likely in for a rough time until its SQL and page
|
|
17
18
|
caches warm up.
|
18
19
|
|
19
20
|
Burninator uses a Redis pub/sub channel to broadcast some percentage of
|
20
|
-
query traffic
|
21
|
+
query traffic from Rails application servers to a central
|
21
22
|
warming process that will run queries against the follower. It uses the
|
22
|
-
ActiveSupport notifications instrumentation API to listen for queries.
|
23
|
-
queries are broadcast through the channel to the warming process which
|
24
|
-
will run them onto the standby database.
|
23
|
+
ActiveSupport notifications instrumentation API to listen for queries.
|
25
24
|
|
26
|
-
Since
|
25
|
+
Since your standby is seeing some percentage of real production query
|
27
26
|
traffic, its caches should keep warm and ready for failover.
|
28
27
|
|
28
|
+
## Requirements
|
29
|
+
|
30
|
+
* Rails application (only tested against 3.2.12)
|
31
|
+
* Redis
|
32
|
+
|
29
33
|
## Installation
|
30
34
|
|
31
|
-
|
35
|
+
### Heroku
|
36
|
+
|
37
|
+
#### Set your warm target in the environment
|
38
|
+
|
39
|
+
```sh
|
40
|
+
$ heroku config:add WARM_TARGET_URL="postgres://..."
|
41
|
+
```
|
32
42
|
|
33
|
-
|
43
|
+
#### Add the gem in your Gemfile
|
34
44
|
|
35
45
|
```ruby
|
36
46
|
gem "burninator"
|
37
47
|
```
|
38
48
|
|
39
|
-
|
49
|
+
#### Add `config/initializers/burninator.rb`
|
40
50
|
|
41
51
|
```ruby
|
42
52
|
burninator = Burninator.new(redis: $redis, percentage: 25)
|
43
53
|
burninator.broadcast
|
44
54
|
```
|
45
55
|
|
46
|
-
|
56
|
+
If you leave off the `redis` parameter, it will create a new connection
|
57
|
+
using what's configured in the environment as `REDIS_URL`.
|
58
|
+
|
59
|
+
`percentage` will default to 5%.
|
60
|
+
|
61
|
+
#### Add the process in your Procfile:
|
47
62
|
|
48
63
|
```ruby
|
49
64
|
burninator: rake burninator:warm
|
50
65
|
```
|
51
66
|
|
52
|
-
Deploy and start burninating
|
67
|
+
#### Deploy and start burninating
|
53
68
|
|
54
69
|
```sh
|
55
|
-
$ heroku config:add WARM_TARGET_URL="postgres://..."
|
56
70
|
$ heroku scale burninator=1
|
57
71
|
```
|
58
72
|
|