Under the Radar 14: Linux Servers for App Developers
00:00:00
◼
►
welcome to under the radar a show but
00:00:01
◼
►
independent ios and app development I'm
00:00:03
◼
►
Marco Arment and I'm David Smith under
00:00:06
◼
►
the radar is never longer than 30
00:00:08
◼
►
so let's get started so last week we
00:00:10
◼
►
mentioned at the end how we were gonna
00:00:12
◼
►
tell this week tips and and stories and
00:00:15
◼
►
setups of how to run your own Linux
00:00:17
◼
►
servers because this is now you know in
00:00:19
◼
►
the wake of the parse announcement last
00:00:21
◼
►
week this is now kind of in the news and
00:00:22
◼
►
we think it's kind of a core competency
00:00:24
◼
►
that many app developers should know
00:00:26
◼
►
just how to run your own servers and and
00:00:28
◼
►
once you know this it enables your apps
00:00:30
◼
►
to be better to be more capable and and
00:00:33
◼
►
if you if you do kind of a standard
00:00:35
◼
►
server route without doing these like
00:00:37
◼
►
kind of more abstract proprietary
00:00:38
◼
►
services like parse it gives you a lot
00:00:41
◼
►
of flexibility with what you can do in
00:00:42
◼
►
the future and it kind of decouples you
00:00:44
◼
►
from depending on a particular third
00:00:47
◼
►
party to keep their their platform going
00:00:48
◼
►
yeah and this is probably fair
00:00:50
◼
►
disclaimer to say this is going to be an
00:00:52
◼
►
episode that goes a bit into the weeds
00:00:54
◼
►
like Dennis had some pretty low level
00:00:56
◼
►
stuff and if that's for you awesome if
00:00:59
◼
►
it isn't for you you know maybe stick
00:01:01
◼
►
around you might learn something and
00:01:02
◼
►
know that you know some some episodes
00:01:04
◼
►
are gonna be high level some episodes
00:01:06
◼
►
are gonna be low level and hopefully we
00:01:08
◼
►
can have a nice balance as a result so
00:01:10
◼
►
at a high level it's probably worth
00:01:12
◼
►
starting of just kind of talking about
00:01:13
◼
►
the the spectrum of hosting before we
00:01:16
◼
►
kind of end it before why we do it the
00:01:18
◼
►
way we do it
00:01:19
◼
►
so ultimately hosting see in many ways
00:01:22
◼
►
comes down to levels of abstraction like
00:01:25
◼
►
how abstracted away if they're like the
00:01:27
◼
►
actual computer that you're running your
00:01:30
◼
►
servers and your backends and systems on
00:01:32
◼
►
how much that is abstracted away from
00:01:35
◼
►
you so like at the lowest level you have
00:01:37
◼
►
a but I think it would be called
00:01:38
◼
►
colocation or something like that where
00:01:40
◼
►
you have a computer that's like your
00:01:43
◼
►
computer that you went to Best Buy or
00:01:45
◼
►
whatever to buy and you're taking it and
00:01:47
◼
►
you're putting it somewhere typically in
00:01:48
◼
►
some kind of data center that you put in
00:01:50
◼
►
a data center so that it has reliable
00:01:51
◼
►
power and reliable internet and reliable
00:01:54
◼
►
air-conditioning and all those types of
00:01:55
◼
►
things but like it's your machine most
00:01:59
◼
►
people don't do that I would really not
00:02:00
◼
►
recommend doing something like that most
00:02:03
◼
►
people with a very least we do but I
00:02:05
◼
►
think most people call like bare metal
00:02:06
◼
►
managed servers where it's not really
00:02:08
◼
►
your machine it's a service that they
00:02:11
◼
►
buy machines they manage machines if
00:02:13
◼
►
harddrive dies in the machine they'll go
00:02:15
◼
►
and fix it for you but it's you have
00:02:18
◼
►
actual like a dedicated piece of
00:02:20
◼
►
hardware you know a set of hard drives a
00:02:23
◼
►
motherboard a CPU that's exactly yours
00:02:26
◼
►
and you probably don't want that either
00:02:28
◼
►
I've I've gone down that road it's fine
00:02:30
◼
►
but it has a lot of difficulties that we
00:02:34
◼
►
aren't really offset by its costs both
00:02:37
◼
►
in monetary and like ease of use so most
00:02:40
◼
►
people who didn't even doing any kind of
00:02:43
◼
►
hosting themselves will use something
00:02:44
◼
►
that's more like a VPS which stands for
00:02:47
◼
►
virtual private server which is like
00:02:49
◼
►
basically like it's a machine from your
00:02:52
◼
►
apps perspective like you are your app
00:02:54
◼
►
sees it's a hard drive it sees a CPU it
00:02:57
◼
►
sees memory but all of those aren't
00:02:59
◼
►
actually physical things they're it's
00:03:02
◼
►
running on a shared environment with a
00:03:04
◼
►
bunch of other systems that I'll see the
00:03:06
◼
►
same things and share resources and you
00:03:09
◼
►
know you can use something like the node
00:03:11
◼
►
for this or digitalocean is another one
00:03:14
◼
►
that's pretty common in many ways ec2
00:03:16
◼
►
kind of runs like this but it's a bit
00:03:18
◼
►
different but you have these kinds of
00:03:20
◼
►
systems where you have a virtual Linux
00:03:23
◼
►
machine that you can do and you have
00:03:24
◼
►
some nice advantages that bit because
00:03:25
◼
►
because it's virtual you can do things
00:03:28
◼
►
like pick it up and move it around you
00:03:30
◼
►
know like you take an image of your hard
00:03:32
◼
►
drive and you can copy it onto another
00:03:33
◼
►
one and things like that that are really
00:03:35
◼
►
easy to manage and from a cost
00:03:38
◼
►
perspective it's way cheaper because
00:03:40
◼
►
you're sharing you know server resources
00:03:42
◼
►
and then above that you have things like
00:03:44
◼
►
virtual server environments things like
00:03:46
◼
►
a juror or Heroku or total abstractions
00:03:49
◼
►
like cloud cater parse or those types of
00:03:51
◼
►
things that are completely abstracting
00:03:53
◼
►
away from you and if I said for most
00:03:56
◼
►
people you probably want to start at a
00:03:57
◼
►
VPS like you want to find out where
00:03:58
◼
►
you're comfortable if you if the thought
00:04:00
◼
►
of administering a Linux server even
00:04:02
◼
►
after this episode is completely
00:04:04
◼
►
overwhelming like maybe go to something
00:04:06
◼
►
like Heroku or Azure where you have a
00:04:09
◼
►
little bit of control over what you're
00:04:11
◼
►
doing but mostly there's something there
00:04:13
◼
►
but it's still at least general-purpose
00:04:15
◼
►
but I think we both run for like reap
00:04:18
◼
►
yes sir vers because once you know what
00:04:21
◼
►
you're doing it's really cheap it's
00:04:23
◼
►
really efficient and you have a lot of
00:04:25
◼
►
flexibility that you could move
00:04:27
◼
►
providers you can spin up new servers
00:04:29
◼
►
and take them down really quickly and
00:04:31
◼
►
easily and you know especially like the
00:04:34
◼
►
cost is amazing it's incredible the
00:04:37
◼
►
amount of performance you can get from a
00:04:38
◼
►
really basic set up I mean at this point
00:04:40
◼
►
I think I administer 19 Virtual Private
00:04:43
◼
►
servers or something like that to ramai
00:04:45
◼
►
apps and it's a pretty big number but
00:04:48
◼
►
the actual load of that of actually
00:04:49
◼
►
doing that is pretty straightforward oh
00:04:51
◼
►
yeah and I mean and things have gotten
00:04:53
◼
►
so cheap over the years like I now pay
00:04:54
◼
►
for all of overcast which is something
00:04:57
◼
►
like something like 11 VPS instances on
00:05:00
◼
►
Linode I now pay for all of them what I
00:05:03
◼
►
used to pay for one database server for
00:05:05
◼
►
Instapaper back in the day and that
00:05:07
◼
►
wasn't that long ago that's like five
00:05:09
◼
►
so what you can get now with with at the
00:05:12
◼
►
VPS level is just incredibly good
00:05:14
◼
►
I was the biggest fan of bare metal
00:05:15
◼
►
dedicated servers before but now even I
00:05:18
◼
►
have converted because you can just you
00:05:20
◼
►
know the competition especially between
00:05:22
◼
►
Linode and digitalocean has has really
00:05:24
◼
►
made incredibly fast Hardware available
00:05:26
◼
►
for almost no money and it also makes it
00:05:29
◼
►
much easier to learn because you know it
00:05:31
◼
►
lets you and we'll get into this in a
00:05:33
◼
►
little bit but it lets you you know if
00:05:34
◼
►
you can just like in you know in a
00:05:37
◼
►
simple command on a web interface so not
00:05:39
◼
►
involving buying anything not involving
00:05:41
◼
►
emailing anybody or placing any orders
00:05:43
◼
►
with anybody just in a web interface you
00:05:45
◼
►
can quickly create an instance of a
00:05:48
◼
►
server then you can do things like let
00:05:50
◼
►
me see how easy is it to set up PHP or
00:05:53
◼
►
whatever like you can do things like
00:05:54
◼
►
that or you can say you know I wonder
00:05:55
◼
►
how whether whether this new district
00:05:58
◼
►
district of linux makes more sense to me
00:05:59
◼
►
or or I wonder if my software will run
00:06:01
◼
►
on this other distro or this other web
00:06:03
◼
►
server or whatever you can just spin up
00:06:05
◼
►
a new instance in minutes and you know
00:06:08
◼
►
run your install script and and you know
00:06:10
◼
►
try poke around try things out see what
00:06:12
◼
►
works you would you know see what breaks
00:06:14
◼
►
and if if at any point you decide this
00:06:17
◼
►
wasn't for you or this didn't go well
00:06:18
◼
►
you can just delete the instance and
00:06:20
◼
►
you've paid up to that point maybe 50
00:06:23
◼
►
cents like it's it's crazy how easy this
00:06:26
◼
►
is to to both administer servers and to
00:06:29
◼
►
learn how to administer servers now in
00:06:31
◼
►
the world of VPS yeah because it's
00:06:33
◼
►
lovely think of most of these are
00:06:34
◼
►
charged by hour of use or something like
00:06:38
◼
►
that and so you can they're just kind of
00:06:39
◼
►
like utility in that way they
00:06:41
◼
►
you can just spin them up when you want
00:06:43
◼
►
him but take him down when you don't
00:06:44
◼
►
want them anymore and like it's very
00:06:47
◼
►
straightforward and easy to do in a way
00:06:49
◼
►
that is kind of scary the first time you
00:06:50
◼
►
do it that you just like hit a button
00:06:52
◼
►
and it's like oh here's a machine go
00:06:54
◼
►
ahead and ssh into it and get started
00:06:56
◼
►
yeah I mean it's so easy that like you
00:06:58
◼
►
know one way you could have done it
00:06:59
◼
►
before is by running something like
00:07:01
◼
►
VMware fusion or parallels on your
00:07:03
◼
►
computer and virtualizing little Linux
00:07:05
◼
►
setups on your computer and doing that
00:07:07
◼
►
but now it's so cheap and easy to go do
00:07:10
◼
►
it on linen or digital ocean that it's
00:07:13
◼
►
actually easier to do that than it is to
00:07:15
◼
►
do it on your local computer like now I
00:07:18
◼
►
do all my experimentation on VPS I don't
00:07:20
◼
►
even have our tools agent software
00:07:21
◼
►
installed anymore on my Mac yeah and I'm
00:07:23
◼
►
the same way like the only thing I used
00:07:25
◼
►
my Mac for when I'm doing this kind of
00:07:27
◼
►
thing is like the first level of the
00:07:30
◼
►
nice thing about using listen like Linux
00:07:32
◼
►
is that it's you know these are the
00:07:34
◼
►
basic underpinning is underneath our
00:07:36
◼
►
Macs are like it's you know it's some
00:07:38
◼
►
kind of UNIX space thing I couldn't tell
00:07:40
◼
►
you all of the history of it but
00:07:41
◼
►
functionally like your Mac is running
00:07:43
◼
►
the same basic stack kernel the types of
00:07:46
◼
►
things that your ultimate server is
00:07:48
◼
►
gonna run and so like I use my Mac
00:07:50
◼
►
because I can learn and kind of
00:07:52
◼
►
prototype and try some of the things
00:07:54
◼
►
that ultimately I'm gonna run on my
00:07:55
◼
►
linic I might like main so server
00:07:57
◼
►
locally like I have a development
00:07:58
◼
►
database that runs on my on my machine I
00:08:00
◼
►
have a web have a web server that runs
00:08:02
◼
►
on my local machine which makes
00:08:04
◼
►
prototyping really quick but as soon as
00:08:05
◼
►
I want to do anything that's going to be
00:08:07
◼
►
simulating my end environment I just
00:08:11
◼
►
yeah I just spin up an instance and run
00:08:12
◼
►
it and I have a couple of just instances
00:08:14
◼
►
that you're just bringing up you're like
00:08:15
◼
►
try it out if it works great if it
00:08:17
◼
►
doesn't you know you can just delete it
00:08:18
◼
►
and start again so wait once you've
00:08:21
◼
►
decided you're going to build and build
00:08:23
◼
►
in a Linux instance and get started like
00:08:26
◼
►
I'm the actual process is pretty
00:08:29
◼
►
straightforward she'll go to a virtual
00:08:30
◼
►
private server provider and just sort of
00:08:34
◼
►
you'll be set up your instance it'll
00:08:36
◼
►
give you some credentials and an IP
00:08:37
◼
►
address and a few things that you'll
00:08:38
◼
►
have for like how to log into it and
00:08:40
◼
►
then you just log in and get started and
00:08:42
◼
►
for most applications you're going to
00:08:44
◼
►
install at least two things on that
00:08:46
◼
►
you're going to install a web server and
00:08:48
◼
►
a database of some kind and starting out
00:08:52
◼
►
you could probably put them both on the
00:08:53
◼
►
same machine
00:08:54
◼
►
eventually you'll probably do a thing
00:08:56
◼
►
where you'll split the web database onto
00:08:58
◼
►
its own machine and put a one or more
00:09:00
◼
►
web servers in front of it but if you
00:09:03
◼
►
know the very least you're going to
00:09:04
◼
►
install some kind of web server
00:09:05
◼
►
environment some kind of database the
00:09:07
◼
►
web server that you choose it's entirely
00:09:09
◼
►
up to you like I use Ruby on Rails for
00:09:12
◼
►
all my backends I think all of your
00:09:13
◼
►
ziering PHP yeah I mean and I have many
00:09:16
◼
►
opinions on like how you choose these
00:09:18
◼
►
tools I will summarize them for the sake
00:09:21
◼
►
of this being a short show I will
00:09:23
◼
►
summarize them as what you want most of
00:09:26
◼
►
all when choosing server software if you
00:09:28
◼
►
don't want to be administering and
00:09:29
◼
►
tweaking with your server constantly
00:09:31
◼
►
what you want is old boring and popular
00:09:34
◼
►
those three things old boring and
00:09:37
◼
►
popular new and trendy does not
00:09:39
◼
►
necessarily always mean better in this
00:09:42
◼
►
case you know especially like what what
00:09:45
◼
►
makes some people think that the new
00:09:46
◼
►
stuff is better is vague claims of it
00:09:49
◼
►
being quote scalable and beware of any
00:09:52
◼
►
claims of things being scalable because
00:09:55
◼
►
in reality scaling web services up not
00:09:59
◼
►
only is it the kind of thing that you
00:10:00
◼
►
will probably never need for almost any
00:10:02
◼
►
project that you do but when you do need
00:10:04
◼
►
it it is way more complicated and there
00:10:08
◼
►
is no silver bullet for scaling there is
00:10:10
◼
►
nothing that automatically scales unless
00:10:13
◼
►
it also automatically scales on for all
00:10:14
◼
►
of your money away but there there is
00:10:16
◼
►
nothing that automatically and easily
00:10:18
◼
►
scales scaling is always complicated and
00:10:20
◼
►
always tricky it's just you know the new
00:10:22
◼
►
things that claim scalability just scale
00:10:24
◼
►
differently and it the challenges are
00:10:27
◼
►
just different challenges the newer
00:10:29
◼
►
something is the trendy or new or
00:10:31
◼
►
something is that means you know the
00:10:35
◼
►
fewer people have experience with it and
00:10:37
◼
►
and the the fewer large installations it
00:10:41
◼
►
has and so that means there's less
00:10:43
◼
►
knowledge in the world about how it
00:10:45
◼
►
fails or what the anti-patterns
00:10:47
◼
►
of it might be so as you go a lower
00:10:50
◼
►
level in the stack being this kind of
00:10:52
◼
►
conservative preferring things that are
00:10:54
◼
►
old boring and popular it becomes more
00:10:55
◼
►
important so like if you want to use
00:10:58
◼
►
like a brand new cutting-edge CSS
00:11:00
◼
►
library go for it doesn't matter really
00:11:02
◼
►
you know if it works for you go for it
00:11:04
◼
►
your risk is pretty low there but you
00:11:06
◼
►
you probably would not want to use
00:11:08
◼
►
a beta version of the Linux kernel you
00:11:11
◼
►
know it's like as you go down the stack
00:11:13
◼
►
you want to be more conservative because
00:11:15
◼
►
it's just it's just kind of a bad idea
00:11:16
◼
►
to take risks lower down and I include
00:11:19
◼
►
things like the database in that you
00:11:21
◼
►
know MySQL and Postgres are great
00:11:23
◼
►
they're battle-tested they are old
00:11:25
◼
►
boring and popular that is what you want
00:11:28
◼
►
in your database just like you wouldn't
00:11:30
◼
►
want a trendy new kind of breaks on your
00:11:32
◼
►
car like you want to time-tested breaks
00:11:35
◼
►
that everyone knows works and everyone
00:11:37
◼
►
knows that you aren't going to be
00:11:38
◼
►
pushing the boundaries of them you know
00:11:40
◼
►
you want a really boring database and I
00:11:44
◼
►
would say you want a really boring
00:11:45
◼
►
language - because let really new
00:11:47
◼
►
cutting-edge languages are still in flux
00:11:50
◼
►
and so if you want to have this kind of
00:11:53
◼
►
like set it and forget it kind of server
00:11:55
◼
►
approach you don't want to have to deal
00:11:57
◼
►
with a young languages frequent changes
00:12:01
◼
►
and frequent needs for being updated you
00:12:04
◼
►
know you want to minimize anything that
00:12:06
◼
►
will require your attention or that
00:12:08
◼
►
might break your app so you want to
00:12:10
◼
►
minimize the need for you know backward
00:12:12
◼
►
compatible updates and things like that
00:12:14
◼
►
or crashes and you know having to
00:12:16
◼
►
install little bug fixes constantly for
00:12:18
◼
►
the for the language of database you're
00:12:20
◼
►
using you want to avoid all of that
00:12:22
◼
►
because new really new means untested or
00:12:26
◼
►
less tested another thing that you hit
00:12:28
◼
►
with new stuff is in the language layer
00:12:31
◼
►
new means that you have fewer
00:12:34
◼
►
third-party libraries and and generally
00:12:36
◼
►
less third-party code and this is a
00:12:38
◼
►
problem like I I'm using PHP forever and
00:12:41
◼
►
PHP third-party code is mostly garbage
00:12:43
◼
►
but there is so much of it out there
00:12:45
◼
►
that any any need that I have I can find
00:12:48
◼
►
something to do it and it isn't always
00:12:50
◼
►
good but I can find something and as
00:12:52
◼
►
I've started writing some newer things
00:12:54
◼
►
and go and go I like as a language
00:12:56
◼
►
conceptually but there because it's such
00:12:59
◼
►
a such a younger language and it isn't
00:13:01
◼
►
that popular yet and might never become
00:13:03
◼
►
popular who knows but because it's it's
00:13:05
◼
►
younger and less popular there is very
00:13:08
◼
►
little third-party go code for some very
00:13:11
◼
►
common things that I keep meeting to do
00:13:12
◼
►
and I keep every time I need to write
00:13:14
◼
►
something new and go I hit this wall of
00:13:16
◼
►
oh I'll just load up the you know
00:13:17
◼
►
markdown module and I look and there's
00:13:19
◼
►
like three of them that are all kind of
00:13:22
◼
►
and you know and I haven't looked in a
00:13:24
◼
►
while for markdown so maybe that's a bad
00:13:25
◼
►
example but I keep hitting that wall
00:13:27
◼
►
whenever I do anything in a new language
00:13:29
◼
►
if oh I just want to see how oh how do I
00:13:31
◼
►
resize an image oh well you kind of
00:13:33
◼
►
can't unless you do this and so it's
00:13:36
◼
►
always easier to use old boring and
00:13:38
◼
►
popular stuff it may be less interesting
00:13:40
◼
►
and if you are the kind of person who
00:13:42
◼
►
wants you know cutting-edge languages
00:13:45
◼
►
and who find that satisfying then you
00:13:48
◼
►
will trade time and maintenance for that
00:13:50
◼
►
and so if for the goal of
00:13:51
◼
►
low-maintenance and and you know low
00:13:54
◼
►
server maintenance I highly suggest that
00:13:56
◼
►
you use other parts of your app to get
00:13:59
◼
►
the kind of like newness out of your
00:14:01
◼
►
system like yeah use the higher-level
00:14:02
◼
►
parts or use maybe the iOS side of it if
00:14:04
◼
►
if you have an iOS and a web app use
00:14:06
◼
►
that side of it to do new cool stuff and
00:14:08
◼
►
make the server as boring old and
00:14:11
◼
►
popular as possible because the old
00:14:12
◼
►
boring popular stuff works it really
00:14:15
◼
►
works it hardly ever breaks and if and
00:14:18
◼
►
you will never be the biggest person
00:14:20
◼
►
using it because long before you know
00:14:22
◼
►
even suppose that you build something
00:14:24
◼
►
with old boring stuff suppose it gets
00:14:27
◼
►
like the size of Etsy right Etsy is huge
00:14:29
◼
►
it's not the biggest website on the on
00:14:31
◼
►
the internet but it's huge right it gets
00:14:32
◼
►
the size of Etsy if you get that big
00:14:35
◼
►
will you be the biggest user of anything
00:14:39
◼
►
in your stack because once you're the
00:14:40
◼
►
biggest user of like your database or
00:14:42
◼
►
something then you basically become a
00:14:45
◼
►
developer of that database you will hit
00:14:47
◼
►
all the bugs you will have to go in and
00:14:48
◼
►
make patches yourself to customize
00:14:50
◼
►
things that aren't working or that
00:14:51
◼
►
aren't working well or aren't working
00:14:52
◼
►
right for you you know so like Facebook
00:14:54
◼
►
if Facebook rolls out tons of patches
00:14:57
◼
►
and things Twitter has rolled out tons
00:14:58
◼
►
of patches or things like memcache I
00:14:59
◼
►
mean like there's there's all these like
00:15:01
◼
►
big companies all these big web
00:15:02
◼
►
companies end up having to basically
00:15:04
◼
►
partially take over parts of the stack
00:15:06
◼
►
that depend on open source wise and make
00:15:09
◼
►
their own contributions and fixes
00:15:10
◼
►
because they hit tons of bugs you never
00:15:12
◼
►
want to be the biggest user of anything
00:15:14
◼
►
in your stack and you know when you
00:15:16
◼
►
start out of course you won't be the
00:15:17
◼
►
biggest user of basically anything but
00:15:19
◼
►
you could become the biggest user like
00:15:20
◼
►
you'd be surprised you know you hear
00:15:22
◼
►
about new trendy things but you'd be
00:15:24
◼
►
surprised how few big companies actually
00:15:27
◼
►
use them so you never want to be that
00:15:29
◼
►
because he was ever anything you want
00:15:30
◼
►
Facebook to have fixed every bug in that
00:15:32
◼
►
stack years before you ever hit it
00:15:35
◼
►
yeah I think we're ready rubber both
00:15:36
◼
►
coming at it from the perspective of
00:15:38
◼
►
being apt developers like what makes our
00:15:40
◼
►
apps cool is not the back end stack
00:15:42
◼
►
that's got nothing to do with like the
00:15:45
◼
►
thing that I'm gonna be marketing my app
00:15:46
◼
►
has like my customer shouldn't care no
00:15:49
◼
►
one like it's only it exists for the
00:15:52
◼
►
sole purpose of just getting a job done
00:15:54
◼
►
like my most of my backends are the most
00:15:56
◼
►
ridiculously boring simple applications
00:15:59
◼
►
as I can possibly make it I put all the
00:16:01
◼
►
much logic and smarts as I can in the
00:16:04
◼
►
apps itself like the database is just
00:16:06
◼
►
it's mostly just a nice wrapper for a
00:16:08
◼
►
database and something that's simple and
00:16:10
◼
►
straightforward that I can set up and
00:16:12
◼
►
then I never think about again like the
00:16:16
◼
►
only time I ever really think about my
00:16:17
◼
►
databases is or like my servers is like
00:16:20
◼
►
when there's some big security thing
00:16:22
◼
►
that I need to make sure was Auto
00:16:23
◼
►
updated or I'm adding major new
00:16:26
◼
►
functionality to the front end to my
00:16:28
◼
►
applications and then I have to go back
00:16:30
◼
►
and like you know add something to it
00:16:33
◼
►
but otherwise I just wanted as simple
00:16:34
◼
►
and basic as can be it's just like a big
00:16:36
◼
►
dish just like a big database that I
00:16:38
◼
►
just a database that I can put things in
00:16:39
◼
►
and then later get them out and as long
00:16:41
◼
►
as it can do that I'm good and if
00:16:43
◼
►
anything what are you using old boring
00:16:45
◼
►
and popular if anything ever goes wrong
00:16:48
◼
►
or if you have any questions whatsoever
00:16:50
◼
►
or anything comes up you can just search
00:16:52
◼
►
the web and you have hundreds of answers
00:16:55
◼
►
from the thousands of other people who
00:16:57
◼
►
have used that already and have
00:16:58
◼
►
documented it like three years earlier I
00:17:00
◼
►
think like it's just it's so much easier
00:17:03
◼
►
to to make your your your server-side
00:17:06
◼
►
stack something that you can easily
00:17:08
◼
►
forget about most of the time and you
00:17:10
◼
►
know you don't even have to deal with it
00:17:12
◼
►
exactly and I guess once you decide on
00:17:16
◼
►
which one you want to do it's like it
00:17:17
◼
►
the process from there is honestly
00:17:18
◼
►
pretty straightforward you pick
00:17:19
◼
►
something you install it usually these
00:17:22
◼
►
kind of things that are pretty
00:17:23
◼
►
straightforward install process like if
00:17:25
◼
►
you're you know there's you be some kind
00:17:27
◼
►
of version of like go get me my sequel
00:17:30
◼
►
go get me Postgres go get me nginx go
00:17:33
◼
►
get me apache and the server will go get
00:17:36
◼
►
it install it configure it you'll change
00:17:38
◼
►
a few configuration files and you'll be
00:17:40
◼
►
up and running because it's boring and
00:17:42
◼
►
the process that I'm getting it set up
00:17:46
◼
►
has been done by thousands of people so
00:17:48
◼
►
everything's
00:17:48
◼
►
automated inscripted and the only thing
00:17:51
◼
►
that I had mentioned there is one thing
00:17:52
◼
►
that I learned early on is once I've set
00:17:54
◼
►
up a server the first kind of what the
00:17:56
◼
►
first time for I always a document how I
00:17:59
◼
►
did it like the steps I did and then I
00:18:01
◼
►
will usually destroy what I did the
00:18:02
◼
►
first time and do it again
00:18:03
◼
►
to make sure I actually know what I'm
00:18:05
◼
►
doing to avoid the situation where down
00:18:07
◼
►
the road you are trying to like recreate
00:18:09
◼
►
a web server and you can never get it to
00:18:11
◼
►
work quite right and it turns out it's
00:18:13
◼
►
because the first time you did it you
00:18:15
◼
►
did this step that you forgot to
00:18:16
◼
►
document and so that was like no one
00:18:19
◼
►
will approach first little pro tip is
00:18:21
◼
►
like the first time you when you think
00:18:22
◼
►
you got it right that's great
00:18:24
◼
►
now do it again because if you if it
00:18:26
◼
►
works the second time then you know you
00:18:28
◼
►
actually understand your city or your
00:18:29
◼
►
setup and could we'll be able to do it
00:18:31
◼
►
multiple times if down the road you need
00:18:33
◼
►
to because when you need to do it down
00:18:34
◼
►
the road it's usually under some kind of
00:18:36
◼
►
duress because you're like wow things
00:18:39
◼
►
are going really well I needed another
00:18:40
◼
►
web server to keep up with the load like
00:18:43
◼
►
that's a good thing but it's also a bit
00:18:44
◼
►
of an urgent thing yeah and VPS does
00:18:46
◼
►
make this so much easier because not
00:18:47
◼
►
only can you like you know you can just
00:18:49
◼
►
clone whatsoever you already have if you
00:18:50
◼
►
need to but also like you can do things
00:18:52
◼
►
like you know automate this with a big
00:18:54
◼
►
shell script as you as you figure out
00:18:56
◼
►
like this is what I do like whenever I
00:18:57
◼
►
have to install you know something new
00:18:58
◼
►
or change something I format everything
00:19:01
◼
►
I'm doing as a shell script as I'm going
00:19:02
◼
►
and then I can then I can rerun it on a
00:19:05
◼
►
fresh server from a VPS like you know it
00:19:08
◼
►
just what you said that you can kind of
00:19:09
◼
►
verify your work and it's it's so much
00:19:12
◼
►
easier man it's like doing this and I
00:19:15
◼
►
should also say like anything that is
00:19:17
◼
►
not really easy to install from a
00:19:19
◼
►
package manager like if if suppose
00:19:21
◼
►
you're looking at you know I'm looking
00:19:23
◼
►
at some PHP library to manipulate an
00:19:25
◼
►
image or something you know that this is
00:19:27
◼
►
just a weird example and if there's like
00:19:29
◼
►
three of them and one of them is in the
00:19:32
◼
►
repository that my server comes with
00:19:34
◼
►
like the the UM or apt-get repo like one
00:19:37
◼
►
of them is in the repo and I can install
00:19:39
◼
►
it with what with you know one word on
00:19:41
◼
►
the command line and one of them needs
00:19:43
◼
►
to be built from source I'm going with
00:19:44
◼
►
the one in the repo because like that's
00:19:47
◼
►
like anything as a general rule of thumb
00:19:49
◼
►
anything that you need to build from
00:19:51
◼
►
source or manually download from
00:19:53
◼
►
somewhere that is not in your package
00:19:54
◼
►
manager try to avoid needing that and
00:19:58
◼
►
and everything becomes a lot easier and
00:20:00
◼
►
package managers are not flawless you
00:20:01
◼
►
know sometimes
00:20:02
◼
►
you'll hit some weird conflict but
00:20:04
◼
►
that's very rare
00:20:06
◼
►
if you especially if you stick with the
00:20:07
◼
►
with like the the default repositories
00:20:09
◼
►
that come configured with it because
00:20:11
◼
►
those are so heavily tested by other
00:20:14
◼
►
people and again old boring and popular
00:20:16
◼
►
that you might not be able to use the
00:20:17
◼
►
newest version of something or or a
00:20:19
◼
►
cutting-edge feature of something or or
00:20:20
◼
►
an obscure module of something but if
00:20:23
◼
►
you can if you can get away with not
00:20:24
◼
►
using it you are saving yourself time in
00:20:27
◼
►
exactly we're sponsored this week by our
00:20:30
◼
►
friends at a glue the intranet you will
00:20:32
◼
►
actually like with a glue you don't have
00:20:34
◼
►
to be stuck at your desk to do your work
00:20:36
◼
►
you can manage your task list from your
00:20:37
◼
►
laptop during a meeting you can share
00:20:39
◼
►
status updates from your phone as you're
00:20:40
◼
►
leaving a client site you can even
00:20:42
◼
►
access the latest version of a file from
00:20:43
◼
►
your home whether you're wearing pants
00:20:46
◼
►
or pajamas or anything nobody will even
00:20:47
◼
►
know these days everything is mobile
00:20:50
◼
►
your work should be - now if you've ever
00:20:52
◼
►
looked at a corporate intranet you can
00:20:54
◼
►
possibly thought whoever designed this
00:20:56
◼
►
must truly hate me and everyone I know
00:20:57
◼
►
with a glue those days are over
00:21:00
◼
►
igloo Internet's are actually places you
00:21:02
◼
►
want to be they're surprisingly
00:21:04
◼
►
configurable you can even customize it
00:21:06
◼
►
and rebrand it to give it the look and
00:21:07
◼
►
feel of your team they have group spaces
00:21:09
◼
►
role-based access permissions easy to
00:21:11
◼
►
use drag-and-drop widget editors so you
00:21:13
◼
►
can reorganize the whole platform to fit
00:21:14
◼
►
exactly how your teams work now of
00:21:16
◼
►
course today Mobile is everywhere igloo
00:21:19
◼
►
is great on mobile they are fully
00:21:21
◼
►
responsive they work on every device any
00:21:23
◼
►
screen size new devices come out they
00:21:25
◼
►
work on day one and they have all these
00:21:27
◼
►
great integrations with modern services
00:21:29
◼
►
that you actually use things like box
00:21:31
◼
►
Google Drive Dropbox all of this is
00:21:33
◼
►
integrated into one big easy to secure
00:21:36
◼
►
platform they do things like 256 bit
00:21:39
◼
►
encryption single sign-on Active
00:21:40
◼
►
Directory integrations you if you know
00:21:42
◼
►
what any of those things are you know
00:21:44
◼
►
how safe and secure a glue is so share
00:21:46
◼
►
your files with your co-workers for
00:21:47
◼
►
everyone to collaborate on do everything
00:21:49
◼
►
you want inside your intranet with a
00:21:51
◼
►
glue break away from the internet that
00:21:52
◼
►
you hate go sign up for a glue right now
00:21:54
◼
►
and you can try for free for any team
00:21:56
◼
►
with 210 people for as long as you want
00:21:58
◼
►
so I put a glue software comm slash
00:22:01
◼
►
radar once again that's a glue software
00:22:03
◼
►
comm slash radar start your free trial
00:22:05
◼
►
today thank you so much to a Lou for
00:22:06
◼
►
supporting under the radar and all of
00:22:08
◼
►
real afm okay so once you now have this
00:22:12
◼
►
the server set up its running your
00:22:15
◼
►
systems up and going
00:22:16
◼
►
the thing that of course seems worth
00:22:18
◼
►
pointing out is some of the lessons
00:22:20
◼
►
we've learned about how things typically
00:22:23
◼
►
go wrong when they actually you know
00:22:26
◼
►
said if you got this deployed you got it
00:22:27
◼
►
running hopefully you have something
00:22:29
◼
►
running to monitor it I think I use
00:22:32
◼
►
Pingdom I don't know what you use but
00:22:34
◼
►
you have some kind of call where I also
00:22:35
◼
►
use big dumb there you go they're a
00:22:37
◼
►
great service it just you give them a
00:22:39
◼
►
URL and they will hit it and one thing I
00:22:41
◼
►
always like with those kinds of URLs is
00:22:44
◼
►
don't point it to like the root URL of
00:22:47
◼
►
your site to make sure that it's up like
00:22:50
◼
►
have a special URL that it hits that
00:22:52
◼
►
will test your whole stack you know so
00:22:54
◼
►
it'll go down to the database make sure
00:22:55
◼
►
the database is running it if you have
00:22:58
◼
►
like a certain search you know query
00:23:00
◼
►
system like it'll go and hit that and
00:23:02
◼
►
then report back results so that you're
00:23:04
◼
►
actually testing your whole thing but
00:23:05
◼
►
you know you have something that's
00:23:07
◼
►
testing it every now and then you'll get
00:23:09
◼
►
a little message that says oh it's down
00:23:11
◼
►
like why is that and usually on the nice
00:23:16
◼
►
thing like it doesn't actually happen
00:23:17
◼
►
very often like for running of as many
00:23:19
◼
►
services I think we both run like
00:23:20
◼
►
outages are pretty rare things are
00:23:22
◼
►
pretty reliable and stable these days
00:23:23
◼
►
like in general like you every now and
00:23:25
◼
►
then you'll hit some kind of network
00:23:27
◼
►
outage in the data center which you
00:23:29
◼
►
can't really do anything about which is
00:23:31
◼
►
awesome because you can't do anything
00:23:32
◼
►
about it yeah you know you go you go on
00:23:34
◼
►
Twitter and you apologize to your users
00:23:35
◼
►
and you just wait for the host to fix it
00:23:37
◼
►
yeah and that's great it's it's there's
00:23:40
◼
►
nothing to be done and that's gonna
00:23:41
◼
►
happen no matter where you are to like
00:23:43
◼
►
originally I think oh well you know
00:23:46
◼
►
maybe I if I was using something else I
00:23:48
◼
►
wouldn't have this problem but it's like
00:23:49
◼
►
everything has this problem like I've
00:23:52
◼
►
been on a lot of hosts before they've
00:23:53
◼
►
all had outages yeah like those are just
00:23:56
◼
►
built into it but like beyond that
00:23:59
◼
►
there's not that many of things that
00:24:00
◼
►
happen like usually the issues I run
00:24:02
◼
►
into you like the most common thing that
00:24:04
◼
►
I'll hit is something like a machine
00:24:08
◼
►
will run out of disk space which seems
00:24:10
◼
►
kind of basic but it's happened to me
00:24:11
◼
►
several times where I turns out I have
00:24:13
◼
►
some log file that isn't being rotated
00:24:15
◼
►
correctly and it's you know it's just
00:24:18
◼
►
like my machine it's completely out of
00:24:19
◼
►
space and so some things it'll just like
00:24:22
◼
►
start falling over in a really confusing
00:24:23
◼
►
way so I just go and check on my servers
00:24:26
◼
►
every now and then and just like make
00:24:28
◼
►
sure that they have space and the space
00:24:30
◼
►
getting smaller and smaller because most
00:24:31
◼
►
servers should just be very stable and
00:24:33
◼
►
unchanging and once you do that things
00:24:36
◼
►
are pretty good and then you run into
00:24:39
◼
►
unfortunately the the next most likely
00:24:42
◼
►
case of problems is probably what we
00:24:44
◼
►
would call human error and unfortunately
00:24:48
◼
►
you are the human that is causing the
00:24:51
◼
►
so we've when you're administering your
00:24:53
◼
►
own servers you have all these little
00:24:55
◼
►
opportunities for you to do something
00:24:57
◼
►
that ends up breaking your back-end I've
00:25:01
◼
►
run a deployment to one of my to my via
00:25:03
◼
►
RSS syncing system feed Wrangler or I
00:25:05
◼
►
roll the deployment out that dropped the
00:25:08
◼
►
main feed item table accidentally that
00:25:11
◼
►
was that was an interesting test of how
00:25:13
◼
►
good my backup strategy was and took the
00:25:16
◼
►
service down for four hours but you know
00:25:19
◼
►
that's why you have backups and that's
00:25:21
◼
►
why you eventually learned to be very
00:25:23
◼
►
very very careful whenever you're
00:25:26
◼
►
touching your production databases yes
00:25:29
◼
►
yeah database backup is very very
00:25:32
◼
►
every VPS provider I know of supports
00:25:35
◼
►
snapshotting the machines backup usually
00:25:37
◼
►
you have to do something special to
00:25:38
◼
►
backup a database because you can't just
00:25:40
◼
►
like copy the file and have it be
00:25:42
◼
►
consistent but there are tools for every
00:25:43
◼
►
popular database to take like snapshot
00:25:45
◼
►
backups of them and dump them into files
00:25:47
◼
►
or whatever so so look into that for
00:25:49
◼
►
your database of choice for MySQL it's
00:25:51
◼
►
definitely a extra backup as the one I
00:25:53
◼
►
recommend from Percona Postgres probably
00:25:55
◼
►
you Postgres people you probably go oh
00:25:57
◼
►
just automatically does this for you you
00:25:58
◼
►
don't have to even think about it cuz
00:25:59
◼
►
Postgres is amazing in MySQL you know
00:26:01
◼
►
bad but right is that is that roughly
00:26:03
◼
►
correct not exactly I used a thing
00:26:05
◼
►
called Wally as my backup system which
00:26:10
◼
►
is yeah like the nice thing about a most
00:26:12
◼
►
good backup systems to with databases is
00:26:15
◼
►
they can often allow you to do point in
00:26:17
◼
►
time recovery mmm which is really
00:26:20
◼
►
helpful for that kind of a human error
00:26:22
◼
►
problem where you issued a particular
00:26:24
◼
►
command at a particular time and that
00:26:27
◼
►
destroyed all your data so like even if
00:26:29
◼
►
you had like your backup if you had a
00:26:32
◼
►
snapshot right afterwards like wouldn't
00:26:33
◼
►
you know it's like you need to recreate
00:26:35
◼
►
the database you need to go back in time
00:26:36
◼
►
and like undo queries and so if you have
00:26:39
◼
►
an a system where that uses point in
00:26:42
◼
►
time recovery which I don't like while
00:26:43
◼
►
he does and I'm sure there's
00:26:44
◼
►
sequal things to do the same thing like
00:26:45
◼
►
you can kind of replay what your
00:26:47
◼
►
database was doing and recreate it like
00:26:49
◼
►
just before you were an idiot yeah bitch
00:26:51
◼
►
binary logging in my school yeah which
00:26:53
◼
►
is awesome being able to do that is a
00:26:55
◼
►
tremendously helpful thing hopefully you
00:26:57
◼
►
never use it but you know I think given
00:27:00
◼
►
that we've both done it or done things
00:27:02
◼
►
like that it probably happened at some
00:27:04
◼
►
point and you just want to be prepared
00:27:05
◼
►
oh yeah one thing also uh you know
00:27:08
◼
►
earlier research about automating as
00:27:09
◼
►
much as possible with the set up as much
00:27:11
◼
►
as you can automate the the health of
00:27:14
◼
►
your servers like you know Pingdom
00:27:16
◼
►
monitoring for the overall uptime of
00:27:18
◼
►
your app is great one thing I do to
00:27:20
◼
►
prevent like your disk space issue is I
00:27:22
◼
►
have to Pingdom alerts for any surface I
00:27:24
◼
►
run one of them is is it up and that
00:27:26
◼
►
one's on high alert if anything goes
00:27:28
◼
►
down it that would like the main site is
00:27:31
◼
►
down then everything of mine beeps and
00:27:34
◼
►
vibrates like everything alerts me but I
00:27:36
◼
►
also have have a lower class one usually
00:27:39
◼
►
called stats or vitals where that hits a
00:27:41
◼
►
special URL which checks all the servers
00:27:44
◼
►
for things like low disk space and very
00:27:47
◼
►
high CPU load and things like that and
00:27:49
◼
►
it it gives Pingdom a down result if
00:27:53
◼
►
anything like that is out of whack and
00:27:56
◼
►
then it's logged in a place that I can
00:27:57
◼
►
see like what caused this so I can see
00:27:59
◼
►
Oh at you know at noon every day this
00:28:02
◼
►
server has a really high load or I can
00:28:05
◼
►
see oh this server right here has low
00:28:07
◼
►
disk space right now so I'm never
00:28:08
◼
►
surprised by things like low disk space
00:28:11
◼
►
or very high load because I have that
00:28:12
◼
►
automated and being automatically
00:28:14
◼
►
checked by another Pingdom check yeah
00:28:16
◼
►
that's a great idea like it's it's it's
00:28:18
◼
►
those types of things that you're just
00:28:20
◼
►
trying to think of ways to anticipate
00:28:22
◼
►
the problem before it happens yeah I
00:28:24
◼
►
mean even like a low-tech version of
00:28:25
◼
►
that which I've done on some servers is
00:28:27
◼
►
you just put a cron job that runs every
00:28:29
◼
►
five minutes that emails you of disk
00:28:31
◼
►
space is too low yeah worst case
00:28:33
◼
►
scenario you wake up to a pile of 40
00:28:34
◼
►
emails okay you go you go and fix it
00:28:36
◼
►
like so it's yeah it's great there's so
00:28:39
◼
►
many easy ways to do this kind of
00:28:40
◼
►
automated maintenance of servers now
00:28:42
◼
►
it's running a server is really not as
00:28:45
◼
►
hard as you might think if you've never
00:28:47
◼
►
done it before yeah and I really think
00:28:50
◼
►
that if you can't if the things that
00:28:51
◼
►
we're talking about this week sounds
00:28:53
◼
►
scary like that's an important thing to
00:28:55
◼
►
get over and get used to and comfortable
00:28:58
◼
►
because as a developer it's just like it
00:29:01
◼
►
feels like it's like in some ways like a
00:29:03
◼
►
very basic skill that if you can't do
00:29:06
◼
►
you're kind of holding both your your
00:29:09
◼
►
work back in terms of the things that
00:29:10
◼
►
the the level of complexity of other
00:29:12
◼
►
projects you want you can take on as
00:29:15
◼
►
well as your career in terms of like the
00:29:16
◼
►
things that you're able to do and the
00:29:18
◼
►
things that you know the jobs you could
00:29:20
◼
►
potentially get and those kinds of
00:29:21
◼
►
things like these are useful scales that
00:29:23
◼
►
don't go out of date if you know at a
00:29:25
◼
►
basic level like how to administer a
00:29:27
◼
►
server that's always going to be useful
00:29:29
◼
►
and interesting like I don't think
00:29:30
◼
►
that's going away like as much as new
00:29:32
◼
►
high level abstractions and things up
00:29:33
◼
►
here like that's cool and all but like
00:29:36
◼
►
UNIX has been around for a very long
00:29:38
◼
►
for very good reasons all right we're
00:29:40
◼
►
out of time this week we'll probably
00:29:41
◼
►
cover more of these topics in the future
00:29:43
◼
►
or expand on them so keep listening if
00:29:45
◼
►
you want more of this or anything else
00:29:46
◼
►
for that matter because we are great and
00:29:48
◼
►
you can keep listening to our show
00:29:49
◼
►
thanks a lot for listening everybody and
00:29:51
◼
►
we'll talk to you next week