These are chat archives for meteor-cardiff/next

26th
Feb 2015
Simon Mansfield
@Siyfion
Feb 26 2015 09:54
Just a quick thanks to @arunoda who was brilliant last night, thanks for taking the time to go through Flow with us all! Hopefully you got some sleep at some point!?
Gareth Rees
@garethrees
Feb 26 2015 09:58
So first question… can I connect to this with IRC? :D
Simon Mansfield
@Siyfion
Feb 26 2015 09:59
So in effect yes, yes you can. Obviously you won't get any of the existing messages though... I think!?
Gareth Rees
@garethrees
Feb 26 2015 10:02
hmm, any idea of what the channel name would be?
Simon Mansfield
@Siyfion
Feb 26 2015 10:03
#meteor-cardiff/next I belive
Argh.. Markdown support caught me out...
This message was deleted
Gareth Rees
@garethrees
Feb 26 2015 10:04
yeah that's what I thought, but doesn't want to join it
Simon Mansfield
@Siyfion
Feb 26 2015 10:05
Hmm... I'll have a go later, but generally I just use the apps.
I've put up two GitHub repo's https://github.com/meteor-cardiff
One for future planning
Gareth Rees
@garethrees
Feb 26 2015 10:06
I've asked in their support channel. I wonder if its because I'm online in the web app
meh, I run enough apps to not want to run yet another comms app :)
Simon Mansfield
@Siyfion
Feb 26 2015 10:06
Haha I know the feeling, I mean I normally just have a tab open, and have desktop notifications switched on
Gareth Rees
@garethrees
Feb 26 2015 10:16
I often close all tabs to "clear my desk" if you like, so yeah I'd never open it again
Simon Mansfield
@Siyfion
Feb 26 2015 10:18
I can't get the IRC server to connect properly atm, so I can't help you there. :(
Gareth Rees
@garethrees
Feb 26 2015 10:18
weird, it connects to the server fine, just not the channel
Simon Mansfield
@Siyfion
Feb 26 2015 10:19
What port are you connecting on?
Gareth Rees
@garethrees
Feb 26 2015 10:19
6667
(with SSL)
sorry
6697
Simon Mansfield
@Siyfion
Feb 26 2015 10:20
Yeah, apparently 6667 should work, but it doesn't seem to... I'll try 6697
Do you get any server response other than just a connected?
Gareth Rees
@garethrees
Feb 26 2015 10:21
[10:20:21] Connecting to [irc.gitter.im] on port 6697
[10:20:22] Connection to host at [54.236.154.180] established.
Simon Mansfield
@Siyfion
Feb 26 2015 10:21
Meh, maybe it was working then...
Gareth Rees
@garethrees
Feb 26 2015 10:22
dunno!
garethrees @garethrees shrugs
Gareth Rees
@garethrees
Feb 26 2015 10:26
Simon Mansfield
@Siyfion
Feb 26 2015 10:27
Hmm.. Perhaps it's down? :/
Gareth Rees
@garethrees
Feb 26 2015 10:27
BTW round-robin is totally bad. I was too tired last night to think about it, but if one of your boxes goes down you might hit the right box for the app to respond and then all the JS fails to load because that request has gone off to the dead machine?
Simon Mansfield
@Siyfion
Feb 26 2015 10:33
I assume you're talking about the Cluster stuff?
Gareth Rees
@garethrees
Feb 26 2015 10:34
yeah
Simon Mansfield
@Siyfion
Feb 26 2015 10:34
Well there wasn't any round-robin per-se, the first example was using multiple DNS entries
and the second was using clusters concept of balancers
Gareth Rees
@garethrees
Feb 26 2015 10:36
"multiple DNS entries" that is round robin?
Michael Mason
@mjmasn
Feb 26 2015 10:36
Hey guys :)
Gareth Rees
@garethrees
Feb 26 2015 10:36
o/
Simon Mansfield
@Siyfion
Feb 26 2015 10:37
@garethrees Yeah, but multiple DNS entries is only the first (flawed) step
After that the browser communicates directly with the balancers
So, as long as there is a single working server in the DNS list, it'll work.
Michael Mason
@mjmasn
Feb 26 2015 10:38
I don't know that the round robin would be bad for that reason, surely the DNS result is cached although that's still a problem if you hit the dead server
I think some/most browsers would try the next IP address after like 30 seconds or something
Simon Mansfield
@Siyfion
Feb 26 2015 10:41
Tbh, I'm not entirely sure... @arunoda will be able to answer, but he may be (finally) sleeping.
Michael Mason
@mjmasn
Feb 26 2015 10:45
No solution is completely foolproof I suppose. I've been looking at using HAProxy for load balancing just because it handles all the SSL termination stuff as well but then you're back to the issue of a single point of failure
Gareth Rees
@garethrees
Feb 26 2015 10:46
No but you can run a redundant HAProxy
Michael Mason
@mjmasn
Feb 26 2015 10:46
That said, we're using Linode VPSs which do have IP swap / failover so there may be a way to have a backup that kicks in automatically
Gareth Rees
@garethrees
Feb 26 2015 10:46
yeah, that;s what you want
I can't say I'd be thrilled at not running the app servers behind an LB of some sort
And yeah, you can terminate SSL there so you get a performance boost from that alne
alone
Simon Mansfield
@Siyfion
Feb 26 2015 10:49
Michael Mason
@mjmasn
Feb 26 2015 10:50
Yeah, if you want SSL with cluster you'd have to have nginx/haproxy running on each app server... Having one or two LBs is less firewall to manage as well, because the app servers can be on a private network with no public network ports open other than maybe SSH
Cluster is definitely a cool idea though, so will keep an eye on it :+1:
Arunoda Susiripala
@arunoda
Feb 26 2015 10:58
About cluster. We build it not to do the job of HaProxy :)
Load Balancing is part of it.
Yes. We can set it up in few different ways.
Simon Mansfield
@Siyfion
Feb 26 2015 10:59
@mjmasn mentioned about DNS caching the results of a (now) dead server, is that an issue?
Arunoda Susiripala
@arunoda
Feb 26 2015 10:59
We can use the same setup as HaProxy where cluster act as a pure load balancer
I'll talk to that :)
Then we can have a another way called multiple balancers
That way, one server accepts the HTTP traffic
all others accepts direct DDP traffic
They need to have DNS
entires for each
Then browser directly connect to the DDP server
If the server is down, browser detects an error
then it'll try to connect to some other DDP server
There is no with DNS here

DNS issue comes
when we try to server HTTP traffic from two different servers
It's an issue, but it's also true if you HaProxy
solution is to use something like Route 53 which does health checks
And we can use a low TTL to get rid of caching

Hope, I answered well :)
And Cluster is one part of the tooling
We'll have a full high performance ddp-proxy which can do rate limits
SSL, monitorting and some other stuff

Arunoda Susiripala
@arunoda
Feb 26 2015 11:05
Most of the other clustering solutions there to run inside a single data centers
Simon Mansfield
@Siyfion
Feb 26 2015 11:05
They also mentioned SSL support and the performance benefit of terminating the SSL before the app-servers. I'm guessing this can't be avoided?
Arunoda Susiripala
@arunoda
Feb 26 2015 11:07
I didn't get that?
If the DDP server is exposed to the public, we must have SSL
That's why we added it to Meteor Up
Michael Mason
@mjmasn
Feb 26 2015 11:08
@arunoda thanks, makes sense, will have to look into Route 53. Our current DNS can only go as low as 5min TTL plus they only update records every 15 minutes which isn't ideal
so how does that SSL work? do you still need nginx or something?
Arunoda Susiripala
@arunoda
Feb 26 2015 11:08
Right now cluster does not access SSL traffic
Since NodeJS suck at SSL
We don't do it
Yes we can use nginx, stud, haproxy or something
We are using it with Meteor Up
It has SSL support via stud
Soon we have a meteor-proxy (or ddp-proxy)
Which will be written in go
and it'll have SSL support
Simon Mansfield
@Siyfion
Feb 26 2015 11:10
Sweet.
Arunoda Susiripala
@arunoda
Feb 26 2015 11:12
I'll soon write some blog post about most of these and the current landscape of infrastructure services like docker, core os and where cluster fits in.
Simon Mansfield
@Siyfion
Feb 26 2015 11:12
I think that would be really useful :)
Michael Mason
@mjmasn
Feb 26 2015 11:13
@arunoda All sounds cool, I saw your tweet the other week about Go and wondered what you were going to do with that
Arunoda Susiripala
@arunoda
Feb 26 2015 11:33
Actually it's better than node for handling high throughput stuff. But for building apps, meteor and node is good.
Simon Mansfield
@Siyfion
Feb 26 2015 12:00
@mjmasn I think it was you asking about Fibers yesterday, wasn't it? I was struggling to remember a blog post on it, well: https://meteorhacks.com/fibers-eventloop-and-meteor.html
Michael Mason
@mjmasn
Feb 26 2015 12:22
@Siyfion nice, thanks :)