Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Nov 17 2017 20:23
    jaschahal edited #13
  • Nov 17 2017 20:22
    jaschahal edited #13
  • Nov 17 2017 20:22
    jaschahal opened #13
  • Jul 25 2017 11:26
    nelsonzheng added as member
  • Jul 25 2017 11:26
    lihan added as member
  • May 08 2017 10:52
    manucr619 commented #12
  • May 03 2017 00:56
    bcalik opened #12
  • Nov 28 2016 15:22
    alexus85 commented #10
  • Nov 27 2016 22:25
    alexus85 edited #11
  • Nov 27 2016 22:25
    alexus85 edited #11
  • Nov 27 2016 22:15
    alexus85 opened #11
  • Nov 27 2016 21:57
    alexus85 edited #10
  • Nov 27 2016 21:56
    alexus85 edited #10
  • Nov 27 2016 21:54
    alexus85 opened #10
  • Jul 26 2016 13:25
    jondubois closed #6
  • Jul 26 2016 13:25
    jondubois commented #6
  • Jul 15 2016 05:05
    surendrakumar1992 opened #9
  • May 20 2016 13:43
    frank-dspeed opened #8
  • Jul 11 2015 12:05

    jondubois on master

    Added Gitter badge Merge pull request #7 from gitt… (compare)

  • Jul 11 2015 12:05
    jondubois closed #7
Nick Kotenberg
@happilymarrieddad
We have it loadbalancing for 3 servers in case that matters
This too
Error: write EPIPE
    at exports._errnoException (util.js:870:11)
    at WriteWrap.afterWrite (net.js:769:14)
undefined
undefined
undefined
undefined
undefined
undefined
Error: write EPIPE
    at exports._errnoException (util.js:870:11)
    at WriteWrap.afterWrite (net.js:769:14)
here is the balancer.js file
// There are the number of these launched in the config file                                                                                   
module.exports.run = function (balancer) {

    balancer.addMiddleware(balancer.MIDDLEWARE_CONNECTION, function(socket, next) {

        next();

    })
}
bsblowi
@bsblowi
test
Jonathan Gros-Dubois
@jondubois
@happilymarrieddad I'm not sure what this is; it could be related to some WebSocket connections not closing properly - Maybe some users lose the connection abruptly (bad internet) or maybe they shut down their mobile phones suddenly - The connection will be terminated and cleaned up in SC but maybe the proxy sockets just hang open in LoadBalancer and then timeout. Let me know if you manage to find what the issue is.
sisso19
@sisso19
Hey there. Im having some issues with understanding the channels that are used in socketcluster.
When a client connects to my socketcluster server he subscribes to 2 channels, one global channel and one channel that is only for that client
To send out messages we expose a post endpoint to push messages to the Id of the clients. The clients channel is prefixed with a constant and then plus the Id of the client.
I need to be able to verify that a message was sent and received by the socketcluster. Currently I am using the scServer.MIDDLEWARE_PUBLISH_OUT and that is working fine if the client is turned on.
However I am unable to use this middleware to detect that a terminal is not on because the middleware does not run unless there is a client on the other end
Is there any way to detect if someone is listening on a channel(client is on and connected) before I send out the message ?
sisso19
@sisso19
Im sorry, This is the incorrect chat, i will post this to the socketcluster discussion
Frank Lemanschik
@frank-dspeed
Hello my frinds i am coding long time on automated distributed loadbalancers and that i have some concepts for this
will share some of them that you could need
Darren
@darrenlooby
Feel free, thoughts are welcome
Alex Petrik
@alexus85
is there any way of changing the way how the LB divides the traffic between nodes? My current configuration is using 2 targets 1st is listening on port 8000 the other on 8001. But I can only see that all the trafic is only routed to the 1st node. Any ideas why it's happening?
also once LB loses it's connection to target , it doesn't even bother re-stablishing it..
Alex Petrik
@alexus85
nah solved it...it was just incorrect port defined in my app.js on client side
Nick Kotenberg
@happilymarrieddad
Jon might be mad at me for posting this here but we've migrated to nginx and are quite happy with it. It plays REALLY well with out SCC application cluster
I do like loadbalancer quite a bit though. Really easy to set up.
Jonathan Gros-Dubois
@jondubois
I haven't done much work loadbalancer.js for a while, the main reason is that nginx and haproxy are both really good with WebSockets now and SC doesn't need special sticky load balancing anymore. I think loadbalacer.js is good if you want to customize the code and roll your own LB; for whatever reason.
Nick Kotenberg
@happilymarrieddad
Yea, that's probably the route I'll eventually go.. I just haven't had time to look at LB lol. It's a great package and I wasn't trying to say anything negative Jon. I hope it didn't come out that way. I was just trying to say the Nginx works great for our current use case.
when I say look at I mean see if I can easily modify it to do auto-scaling.
Jonathan Gros-Dubois
@jondubois
Yeah I think nginx and haproxy have entire teams of very experienced people working on those projects so it's impossible to keep up in the long term with this project
Nick Kotenberg
@happilymarrieddad
@jondubois hey man how do I find the master process in something like htop so I can send a kill signal to the workers?
I always see a bunch of node processes.
Jonathan Gros-Dubois
@jondubois
When you launch SC, it should tell you what the PID of the master process is in the console
Nick Kotenberg
@happilymarrieddad
like which one of these would I send the kill signal to to restart the workers?
what if it's been running for like 50 days
Jonathan Gros-Dubois
@jondubois
The master process should still be the same
Nick Kotenberg
@happilymarrieddad
yea but I don't know what the PID is.. I never wrote it down
Jonathan Gros-Dubois
@jondubois
Yeah it's a bit tricky. I don't know if there is a way to label processes better with Linux/Node.js
The master process is usually the one with the smallest PID
Nick Kotenberg
@happilymarrieddad
SIGu2 or whatever it is to a worker will that cause any issues"?
lol can't remember the command for some reason
Jonathan Gros-Dubois
@jondubois
It shouldn't cause any issues if you accidentally hit a worker
kill -SIGUSR2 pid
Nick Kotenberg
@happilymarrieddad
nice! I'll just run sc under a different user and hit all processes under that user with that command
kill -SIGUSR2 -u dummyuser
or w/e
Nick Kotenberg
@happilymarrieddad
@jondubois hey man if I added a little web service to loadbalancer to allow an external resource to append servers to the server list on loadbalancer is that something that may be approved?
or should I fork it
Frank Lemanschik
@frank-dspeed
did some one du benchmarks against stick sessions from haproxy?
du = do sorry
Benjamin Stanley
@HeadClot
Hey everyone
Nick Kotenberg
@happilymarrieddad
hey man
大V
@iamweilee
大家好
relbraun
@relbraun
kkk
@sisso19
mz
@mzdz
hi
Sarfaraz alam
@SarfarazAlam-SQL
Hi, can any one help me in loadblancer I want to routing request on the base of requested uri??
Nick Kotenberg
@happilymarrieddad
@SarfarazAlam-SQL you should use Nginx. Loadbalancer is just a basic load balancer between SC applications. If you want complex routing you need something more complex. Thanks
Sarfaraz alam
@SarfarazAlam-SQL
@happilymarrieddad thanks your help. I want to go in-deep in this thought e.g my website is developed in angular and hosted on abc.com and my further request are going on abc.com/login abc.com/categories . Login and categories are hosted on different port as separate application. but url host name is same.
please help.