Git Product home page Git Product logo

heroku-load-balancer's Introduction

Hi there! 👋

My name is Dmytro, I am in my late twenties, living in Kyiv, Ukraine. I completed Bachelor's degree in Software Engineering. I am a T-shaped Software Engineer and Tech Lead with 6+ years of experience in development and operations in startups and product companies.

I am good at leading and influencing engineering-wide best practices within teams and across others for the full software development life cycle, including documentation, design, coding standards, code reviews, building, testing, and deployment as well as leading teams of 3-5 software engineers, coaching and mentoring less experienced developers and peers.

I have the following outside-of-work achievements:

  • An open source enthusiast being top 5.5K worldwide by GitHub accounts ranking.
  • A recurring speaker on the largest Ukrainian IT community's podcast about DevOps with 65K+ subscribers on YouTube.
  • An author of 15+ articles about software engineering in 3 different languages that have 325K+ views in total on Medium, DOU, and Habr (not under maintenance).

The latest articles:

The latest video or speech:

(DevOps Podcast Episode #0)

heroku-load-balancer's People

Contributors

dmytrostriletskyi avatar fabiofleitas avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

heroku-load-balancer's Issues

Heroku crash

Process exited with status 1
2021-09-02T15:37:48.338258+00:00 app[web.1]: Traceback (most recent call last):
2021-09-02T15:37:48.338267+00:00 app[web.1]: File "src/entrypoint.py", line 61, in
2021-09-02T15:37:48.338268+00:00 app[web.1]: cli()
2021-09-02T15:37:48.338268+00:00 app[web.1]: File "/usr/local/lib/python3.6/dist-packages/click/core.py", line 764, in call
2021-09-02T15:37:48.338268+00:00 app[web.1]: return self.main(*args, **kwargs)
2021-09-02T15:37:48.338269+00:00 app[web.1]: File "/usr/local/lib/python3.6/dist-packages/click/core.py", line 717, in main
2021-09-02T15:37:48.338269+00:00 app[web.1]: rv = self.invoke(ctx)
2021-09-02T15:37:48.338269+00:00 app[web.1]: File "/usr/local/lib/python3.6/dist-packages/click/core.py", line 1137, in invoke
2021-09-02T15:37:48.338270+00:00 app[web.1]: return _process_result(sub_ctx.command.invoke(sub_ctx))
2021-09-02T15:37:48.338270+00:00 app[web.1]: File "/usr/local/lib/python3.6/dist-packages/click/core.py", line 956, in invoke
2021-09-02T15:37:48.338270+00:00 app[web.1]: return ctx.invoke(self.callback, **ctx.params)
2021-09-02T15:37:48.338270+00:00 app[web.1]: File "/usr/local/lib/python3.6/dist-packages/click/core.py", line 555, in invoke
2021-09-02T15:37:48.338270+00:00 app[web.1]: return callback(*args, **kwargs)
2021-09-02T15:37:48.338271+00:00 app[web.1]: File "src/entrypoint.py", line 53, in create_load_balancer
2021-09-02T15:37:48.338271+00:00 app[web.1]: identifier=pipeline_identifier,
2021-09-02T15:37:48.338271+00:00 app[web.1]: File "/heroku-load-balancer/src/heroku.py", line 62, in by_pipeline_identifier
2021-09-02T15:37:48.338271+00:00 app[web.1]: if application.get('stage') == 'production':
2021-09-02T15:37:48.338272+00:00 app[web.1]: AttributeError: 'str' object has no attribute 'get'

301 redirects do not work

It looks like redirects do not work as they redirect you to http://main:8001/login/?next=/dashboard/ for example

Set ratelimit

Hi,

first of all thank you for this package it's exactly what I was looking for for my apps.

I need to specify a ratelimit and custom error pages in the load balancer.

I succeeded in setting up the ratelimit in the "constants.py" file.

`limit_req_zone $binary_remote_addr zone=limit:20m rate=10r/m;

server <
    listen {port};

    location / <

        limit_req zone=limit burst=5 nodelay;
        limit_req_status 429;

        proxy_pass http://main;
        proxy_next_upstream error timeout invalid_header http_502 http_503 http_504;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header Host $http_host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header X-Forwarded-Host $host;
    >`

On the other hand, after several tries I can't display my specific page if the ratelimit is reached.

In my Nginx configuration I had this

error_page 429 =429 /error_429.json; location = /error_429.json { root <%= ENV['HOME'] %>; }

==>

error_page 429 =429 /error_429.json; location = /error_429.json < root /; >

I tried several things but I think it is the root that is not working. How to get the variable ENV HOME from Heruku so that it points where it should.

I added the file error_429.json in the src folder and in the root of the project.

Sorry I'm not comfortable with Python at all.

Thanks

Heroku already has built-in load balancing

From the Heroku documentation,
HTTP Routing:

So scaling an app’s capacity to handle web traffic involves scaling the number of web dynos:

$ heroku ps:scale web+5

A random selection algorithm is used for HTTP request load balancing across web dynos

Stated another way: when you scale up a Heroku app to multiple dynos (server instances), the platform automatically routes incoming requests using a randomized load-balancing algorithm.

So, what problem does this project solve? It seems like this would make your Heroku app more complex & brittle, harder to maintain, and more difficult to onboard new developers.

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.