Code Monkey home page Code Monkey logo

cerberus's People

Contributors

dependabot-preview[bot] avatar dependabot[bot] avatar fossabot avatar imgbotapp avatar qraimbault avatar zyigh avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

fossabot

cerberus's Issues

Implement FastHTTP on Admin API

Is your feature request related to a problem? Please describe.

Today, the reverse proxy is based on fastHTTP, and the administration is based on net/http. Two problems emerge from that :

  • Two different technologies does the same thing (http server) for the same codebase, which can be hard to maintain
  • FastHTTP is more efficient and handle http servers problematic is a more appreciable way.

Describe the solution you'd like

Administration server should be based on fastHTTP

Describe alternatives you've considered

  • Keep going like we do now.

    The biggest problem is if we can't go further in the development of the project because we have to rely on fastHTTP. For now on, the project is small enough to consider refactor it without wasting too much time. If the administration application grow too much, it will be very painful to do so.

  • Use fastHTTPAdaptador

    It could be an option, yet it seems that it implies keeping net/http AND fastHTTP which doesn't seem conceptually right, especially at the begining of the project where we can do a real transition.

Additional context

Can't shutdown while trying to connect to the database

Describe the bug
On Cerberus startup, while it is trying to connect to the database and retries, you can't shutdown it with CTRL+C.

To Reproduce
Steps to reproduce the behavior:

  1. Start server with no DB server started
  2. Try to CTRL+C when it attempts to connect

Expected behavior
CTRL+C shuts the server down.

Environment (please complete the following information):

  • OS+Distribution: *
  • Version: 0.1.0
  • Cloud/Hypervisor: NA

Implement services caching system

Is your feature request related to a problem? Please describe.
Today, you have to reload Cerberus to update data about services from database to make it available.

Describe the solution you'd like
It would be nicer to be able to :

  1. Every time the leader node does its routine, check up what's new in the database and add or update it in Redis (Note in additional context)
  2. When a route is asked, check in memory (in /proxy/services.go#services), if it is: serve
  3. If not in memory, check in Redis
    • If in Redis :
      • Add it in memory (Note in additional context)
      • Return to number 2
    • If not in Redis : 404 not found

Additional context
Database : Implies updatedAt lastChecked in MySQL ans check which one is bigger in go

Mutex : to prevent weird behaviour in case of simultaneous writing, prevent with a mutex concurrent writings in /proxy/services.go#services

Also possible in the future : It will be possible to bypass memory and only rely on Redis for services

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.