Giter Club home page Giter Club logo

Comments (2)

JonAbrams avatar JonAbrams commented on August 16, 2024

Looks like there were no commits for a couple years until this past day. I'm guessing the author tried to deploy the new code with disastrous results?

@e1ven need any help?

from robohash.

e1ven avatar e1ven commented on August 16, 2024

The nodes were getting overloaded, which was causing the site to go slow and stop responding.. I added some additional digital ocean nodes. When I did, it wasn't generating the hashes with the same order as it had traditionally. I didn't want the hash to depend on what server you were hitting, so I added code to re-force the hash order.

Coming back to RH after a few years, I realize I should have spent more time originally ensuring that the order for the images was always consistent, rather than implicitly relying on inode order.
I also should have had test coverage, but that's another show.

Once I fixed the code, I was able to bring the new nodes online.

When nodes start becoming overloaded, image requests that don't hit cache start building up, until it's not keeping up with demand, building a bigger and bigger backlog. This causes the machine to eventually go out of rotation, and the other nodes get hit even harder, until you're in runaway.

At that point, if you add new nodes to the rotation, they'll get 100% of the traffic, and go down too - You need to take the Load balancer down entirely, drain the connections to each node, then bring it back up.

If it were a real app, I'd probably set up an auto-scale group at EC2, but that would cost me real money :)
Sorry about the downtime - Hopefully it should be fixed now.

from robohash.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.