harrystech / dynosaur Goto Github PK
View Code? Open in Web Editor NEWAn auto-scaling engine for Heroku web dynos using pluggable API connections.
License: MIT License
An auto-scaling engine for Heroku web dynos using pluggable API connections.
License: MIT License
If you run dynosaur on heroku, your app will be restarted at least every 24 hours. So you will have less than 24 hours worth of data, yet the Papertrail plugin requires a full day of data since it resets every 24 hours too.
If these two events happen at the wrong time, you will be scaling down and then rapidly scaling back up, which for one thing makes Papertrail (the company) unhappy.
A fix for this might involve storing the RingBuffer data in Redis. Redis might have a data structure that can act as a ringbuffer.
Note: I have disabled our papertrail scaling because of this and #14.
ExampleException in home#example
Something really bad happened
app/controllers/home_controller.rb:123 - example
app/controllers/other_controller.rb:12 - broken
lib/important/magic.rb:4 - load_something
Eg in low periods scale down to hobby and scale up when needed
Librato metrics are currently reported as unassigned
.
We should add a source to each metric we send: https://github.com/harrystech/dynosaur/blob/master/lib/dynosaur/stats/librato.rb#L25
Hey, it would be great to get you on the latest and greatest API here. This would involve some transition for you, likely from the heroku-api
gem to heroics
. v3 is still in Beta presently, but we are nearing GA rapidly and I think there are a lot of great benefits to using the newer system.
You can find docs for the the API here: https://devcenter.heroku.com/articles/platform-api-reference
And more about heroics here: https://github.com/heroku/heroics
I'm certainly happy to answer any concerns or questions along the way, just wanted to reach out to you and start the discussion (I work at Heroku on the API team and designed the new API, so hopefully I can help with any issues you might have).
Thanks!
NoMethodError in gems/autoparse-0.3.3/lib/autoparse/instance.rb:315
undefined method `totalResults' for #<Google::APIClient::Schema::Analytics::V3::RealtimeData:0x007fbbb6e3bb50>
gems/autoparse-0.3.3/lib/autoparse/instance.rb:315 - method_missing
gems/autoparse-0.3.3/lib/autoparse.rb:123 - block (2 levels) in generate
bundler/gems/dynosaur-70f9ab741a9e/lib/dynosaur/inputs/google_analytics_input_plugin.rb:112 - get_active_users
Actually scaling an addon is broken. I am disabling addon scalers in our config for now.
Looks like we just need to upgrade out platform-api usage.
Expected([200, 201, 202, 204, 206, 304]) <=> Actual(422 Unprocessable Entity) /app/vendor/bundle/ruby/2.2.0/gems/excon-0.45.4/lib/excon/middlewares/expects.rb:6:in `response_call' /app/vendor/bundle/ruby/2.2.0/gems/excon-0.45.4/lib/excon/middlewares/response_parser.rb:8:in `response_call' /app/vendor/bundle/ruby/2.2.0/gems/excon-0.45.4/lib/excon/connection.rb:372:in `response' /app/vendor/bundle/ruby/2.2.0/gems/excon-0.45.4/lib/excon/connection.rb:236:in `request' /app/vendor/bundle/ruby/2.2.0/gems/heroics-0.0.14/lib/heroics/link.rb:60:in `run' /app/vendor/bundle/ruby/2.2.0/gems/heroics-0.0.14/lib/heroics/resource.rb:27:in `method_missing' /app/vendor/bundle/ruby/2.2.0/gems/platform-api-0.3.0/lib/platform-api/client.rb:539:in `update' /app/vendor/bundle/ruby/2.2.0/bundler/gems/dynosaur-e1999cbd4b3b/lib/dynosaur/heroku_addon_manager.rb:22:in `set' /app/vendor/bundle/ruby/2.2.0/bundler/gems/dynosaur-e1999cbd4b3b/lib/dynosaur/heroku_manager.rb:50:in `ensure_value' /app/vendor/bundle/ruby/2.2.0/bundler/gems/dynosaur-e1999cbd4b3b/lib/dynosaur/controllers/papertrail_controller_plugin.rb:23:in `scale' /app/vendor/bundle/ruby/2.2.0/bundler/gems/dynosaur-e1999cbd4b3b/lib/dynosaur/controllers/abstract_controller_plugin.rb:77:in `run'
I have setup a server running dynosaur with NewRelicInputPlugin and every day I get many exceptions like these:
comparison of Fixnum with nil failed
/app/vendor/bundle/ruby/2.1.0/bundler/gems/dynosaur-eb2ae5c61d4c/lib/dynosaur/inputs/abstract_input_plugin.rb:65:in `each'
/app/vendor/bundle/ruby/2.1.0/bundler/gems/dynosaur-eb2ae5c61d4c/lib/dynosaur/inputs/abstract_input_plugin.rb:65:in `max'
/app/vendor/bundle/ruby/2.1.0/bundler/gems/dynosaur-eb2ae5c61d4c/lib/dynosaur/inputs/abstract_input_plugin.rb:65:in `max_recent_values'
/app/vendor/bundle/ruby/2.1.0/bundler/gems/dynosaur-eb2ae5c61d4c/lib/dynosaur/inputs/abstract_input_plugin.rb:32:in `estimated_resources'
/app/vendor/bundle/ruby/2.1.0/bundler/gems/dynosaur-eb2ae5c61d4c/lib/dynosaur/controllers/abstract_controller_plugin.rb:49:in `block in get_combined_estimate'
/app/vendor/bundle/ruby/2.1.0/bundler/gems/dynosaur-eb2ae5c61d4c/lib/dynosaur/controllers/abstract_controller_plugin.rb:48:in `each'
/app/vendor/bundle/ruby/2.1.0/bundler/gems/dynosaur-eb2ae5c61d4c/lib/dynosaur/controllers/abstract_controller_plugin.rb:48:in `get_combined_estimate'
/app/vendor/bundle/ruby/2.1.0/bundler/gems/dynosaur-eb2ae5c61d4c/lib/dynosaur/controllers/abstract_controller_plugin.rb:74:in `run'
/app/vendor/bundle/ruby/2.1.0/bundler/gems/dynosaur-eb2ae5c61d4c/lib/dynosaur/autoscaler.rb:73:in `block in run_loop'
/app/vendor/bundle/ruby/2.1.0/bundler/gems/dynosaur-eb2ae5c61d4c/lib/dynosaur/autoscaler.rb:72:in `each'
/app/vendor/bundle/ruby/2.1.0/bundler/gems/dynosaur-eb2ae5c61d4c/lib/dynosaur/autoscaler.rb:72:in `run_loop'
/app/vendor/bundle/ruby/2.1.0/bundler/gems/dynosaur-eb2ae5c61d4c/lib/dynosaur/autoscaler.rb:59:in `start'
/app/vendor/bundle/ruby/2.1.0/bundler/gems/dynosaur-eb2ae5c61d4c/bin/dynosaur:24:in `'
/app/vendor/bundle/ruby/2.1.0/bin/dynosaur:23:in `load'
/app/vendor/bundle/ruby/2.1.0/bin/dynosaur:23:in `
comparison of NilClass with 2 failed
/app/vendor/bundle/ruby/2.1.0/bundler/gems/dynosaur-eb2ae5c61d4c/lib/dynosaur/inputs/abstract_input_plugin.rb:65:in `each'
/app/vendor/bundle/ruby/2.1.0/bundler/gems/dynosaur-eb2ae5c61d4c/lib/dynosaur/inputs/abstract_input_plugin.rb:65:in `max'
/app/vendor/bundle/ruby/2.1.0/bundler/gems/dynosaur-eb2ae5c61d4c/lib/dynosaur/inputs/abstract_input_plugin.rb:65:in `max_recent_values'
/app/vendor/bundle/ruby/2.1.0/bundler/gems/dynosaur-eb2ae5c61d4c/lib/dynosaur/inputs/abstract_input_plugin.rb:32:in `estimated_resources'
/app/vendor/bundle/ruby/2.1.0/bundler/gems/dynosaur-eb2ae5c61d4c/lib/dynosaur/controllers/abstract_controller_plugin.rb:49:in `block in get_combined_estimate'
/app/vendor/bundle/ruby/2.1.0/bundler/gems/dynosaur-eb2ae5c61d4c/lib/dynosaur/controllers/abstract_controller_plugin.rb:48:in `each'
/app/vendor/bundle/ruby/2.1.0/bundler/gems/dynosaur-eb2ae5c61d4c/lib/dynosaur/controllers/abstract_controller_plugin.rb:48:in `get_combined_estimate'
/app/vendor/bundle/ruby/2.1.0/bundler/gems/dynosaur-eb2ae5c61d4c/lib/dynosaur/controllers/abstract_controller_plugin.rb:74:in `run'
/app/vendor/bundle/ruby/2.1.0/bundler/gems/dynosaur-eb2ae5c61d4c/lib/dynosaur/autoscaler.rb:73:in `block in run_loop'
/app/vendor/bundle/ruby/2.1.0/bundler/gems/dynosaur-eb2ae5c61d4c/lib/dynosaur/autoscaler.rb:72:in `each'
/app/vendor/bundle/ruby/2.1.0/bundler/gems/dynosaur-eb2ae5c61d4c/lib/dynosaur/autoscaler.rb:72:in `run_loop'
/app/vendor/bundle/ruby/2.1.0/bundler/gems/dynosaur-eb2ae5c61d4c/lib/dynosaur/autoscaler.rb:59:in `start'
/app/vendor/bundle/ruby/2.1.0/bundler/gems/dynosaur-eb2ae5c61d4c/bin/dynosaur:24:in `'
/app/vendor/bundle/ruby/2.1.0/bin/dynosaur:23:in `load'
/app/vendor/bundle/ruby/2.1.0/bin/dynosaur:23:in `
I would suggest a directory of separate config files that each spin up a parallelized dynosaur scaler.
References https://github.com/harrystech/dynosaur-rails/issues/4
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.