Skip to content

GitLab

  • Menu
    • Projects Groups Snippets
      Help
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • G gitlabhq1
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 21
    • Issues 21
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 12
    • Merge requests 12
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • gpt
  • large_projects
  • gitlabhq1
  • Merge requests
  • !6822

Closed
Created 11 years ago by Administrator@rootOwner
  • Report abuse
Report abuse

notes pub/sub via faye

  • Overview 16
  • Commits 1
  • Changes 10

Created by: skv-headless

Replace notes polling to pub/sub via faye. The main reason for that is high load which generated by polling. At our installation 80%-90% requests are notes requests. Also with pub/sub comments appear immediately.

Loading
Loading

  • Administrator
    Administrator @root started a thread on commit 068e8028 11 years ago
    Gemfile
    166 166 gem "gon", '~> 5.0.0'
    167 167 gem 'nprogress-rails'
    168 168
    169 gem "private_pub"
    170 gem 'thin'
    • Administrator
      Administrator @root · 11 years ago
      Owner

      Created by: jvanbaarsen

      Why did you move thin out of the development group?

      By Administrator on 2014-04-19T13:39:07 (imported from GitLab project)

  • Administrator
    Administrator @root started a thread on commit 068e8028 11 years ago
    Procfile
    1 1 web: bundle exec unicorn_rails -p ${PORT:="3000"} -E ${RAILS_ENV:="development"} -c ${UNICORN_CONFIG:="config/unicorn.rb"}
    2 2 worker: bundle exec sidekiq -q post_receive,mailer,system_hook,project_web_hook,common,default,gitlab_shell
    3 faye: bundle exec rackup private_pub.ru -s thin -E production
    • Administrator
      Administrator @root · 11 years ago
      Owner

      Created by: jvanbaarsen

      This means that when i run foreman start for development purposes, faye will start in production. Would it be possible for it to take over the rails_env?

      By Administrator on 2014-04-19T13:40:00 (imported from GitLab project)

  • Administrator
    Administrator @root started a thread on commit 068e8028 11 years ago
    config/private_pub.yml
    1 development:
    2 server: "http://localhost:9292/faye"
    3 secret_token: "secret"
    • Administrator
      Administrator @root · 11 years ago
      Owner

      Created by: jvanbaarsen

      I think it would be best to document somewhere that people have to change those secrets. Or maybe better, create an: config/private_pub.xml.example and let people copy it.

      By Administrator on 2014-04-19T13:41:09 (imported from GitLab project)

  • Administrator
    Administrator @root · 11 years ago
    Owner

    Created by: jvanbaarsen

    Is there a request on the feature request forum that is similar to this? If so, can you make a comment with a link to it? Please be aware that new functionality that is not marked accepting merge/pull requests on the forum might not make it into GitLab. You might be asked to make changes and even after implementing them your feature might still be declined. If you want to reduce the chance of this happening please have a discussion in the forum first.

    By Administrator on 2014-04-19T13:41:27 (imported from GitLab project)

  • Administrator
    Administrator @root started a thread on commit 068e8028 11 years ago
    Gemfile
    166 166 gem "gon", '~> 5.0.0'
    167 167 gem 'nprogress-rails'
    168 168
    169 gem "private_pub"
    170 gem 'thin'
    • Administrator
      Administrator @root · 11 years ago
      Owner

      Created by: skv-headless

      faye use it.

      By Administrator on 2014-04-19T14:27:42 (imported from GitLab project)

  • Administrator
    Administrator @root started a thread on commit 068e8028 11 years ago
    Procfile
    1 1 web: bundle exec unicorn_rails -p ${PORT:="3000"} -E ${RAILS_ENV:="development"} -c ${UNICORN_CONFIG:="config/unicorn.rb"}
    2 2 worker: bundle exec sidekiq -q post_receive,mailer,system_hook,project_web_hook,common,default,gitlab_shell
    3 faye: bundle exec rackup private_pub.ru -s thin -E production
    • Administrator
      Administrator @root · 11 years ago
      Owner

      Created by: skv-headless

      Faye doesn't work with -E development actually I don't why. But It works in all environment.

      By Administrator on 2014-04-19T14:33:34 (imported from GitLab project)

  • Administrator
    Administrator @root · 11 years ago
    Owner

    Created by: skv-headless

    I hope you will be exited about this PR. I'm not sure that it's a feature, rather than performance optimization, I wrote about number of requests. I know that there is some work, which I can't finish without core team help, but I will not continue to work with that until you decide are you need it.

    By Administrator on 2014-04-19T14:41:23 (imported from GitLab project)

  • Administrator
    Administrator @root · 11 years ago
    Owner

    Created by: jvanbaarsen

    @randx / @dosire Can you decide about this feature please?

    By Administrator on 2014-04-20T11:05:53 (imported from GitLab project)

  • Administrator
    Administrator @root · 11 years ago
    Owner

    Created by: jvanbaarsen

    @skv-headless Thanks for your contribution though!

    By Administrator on 2014-04-20T11:06:11 (imported from GitLab project)

  • Administrator
    Administrator @root · 11 years ago
    Owner

    Created by: dosire

    It would be awesome to replace this with pub/sub. On GitLab.com 86% of the time is spend on NotesController#Index. But @randx will have to look into this MR.

    By Administrator on 2014-04-20T11:19:55 (imported from GitLab project)

  • Administrator
    Administrator @root · 11 years ago
    Owner

    Created by: dzaporozhets

    Why not mount faye inside rails app?

    By Administrator on 2014-04-22T08:50:43 (imported from GitLab project)

  • Administrator
    Administrator @root · 11 years ago
    Owner

    Created by: skv-headless

    Unicorn can't handle persistent connections.

    By Administrator on 2014-04-22T09:19:46 (imported from GitLab project)

  • Administrator
    Administrator @root · 11 years ago
    Owner

    Created by: dzaporozhets

    adding one more web server process is also not an option. Running sidekiq, unicorn, thin will increase amount of memory to start app and also make things more complicated. I am ok with faye but only mounted inside rails app so we can start only one webserver. If unicorn is not working - please suggest alternative web server.

    By Administrator on 2014-04-22T09:32:46 (imported from GitLab project)

  • Administrator
    Administrator @root · 11 years ago
    Owner

    Created by: dzaporozhets

    Or we can just impove existing comment loading logic. Ex. ask server only for new comments

    By Administrator on 2014-04-22T09:37:27 (imported from GitLab project)

  • Administrator
    Administrator @root · 11 years ago
    Owner

    Created by: dosire

    I would really like that, not implement pub/sub but query the server with the updated_at time of the most recent commit. This means the server doesn't have to go over all comments to see if something changed.

    By Administrator on 2014-04-22T09:39:31 (imported from GitLab project)

  • Administrator
    Administrator @root · 11 years ago
    Owner

    Created by: jvanbaarsen

    If that means we dont have to support another webserver, im all for that option :D

    By Administrator on 2014-04-22T09:41:12 (imported from GitLab project)

  • You're only seeing other activity in the feed. To add a comment, switch to one of the following options.
Please register or sign in to reply
0 Assignees
None
Assign to
0 Reviewers
None
Request review from
Milestone
No milestone
None
None
Time tracking
No estimate or time spent
0
Labels
None
Assign labels
  • No matching results
  • Manage project labels
Lock merge request
Unlocked
1
1 participant
user avatar
Reference: gpt/large_projects/gitlabhq1!6822
Source branch: github/fork/skv-headless/notes-pub-sub

    0 pending comments

Menu

Projects Groups Snippets
Help