Now I talked a lot about replica sets, sharding and that we'll see something about that when we deploy
our mongodb server,
now it's finally time to do this.
We want to get our localhost mongod instance into the web,
so we want to get it on a server that we can reach from anywhere and not only from well our inside our
computer. Now deploying a mongodb server is a complex task,
it's definitely more complex than just deploying a website because you need to do a lot of things,
a lot of configuration. You need to manage shards if you want to have sharding,
you need to manage your replica sets, you have to set up user authentication and with that, I mean authentication
to the database, not users
your application, your website might be using. You need to protect the web server and the network which
is now totally unrelated to mongodb but a general web hosting task. You need to ensure that software
stays up to date,
general server software but also of course mongodb related software, that security
patches are applied. You want to set up regular backups for your data,
you might have replica sets and still backing up data to a disk might be an additional good idea in
case that everything goes down. And you also want to worry about encryption, both during transportation
and at rest.
So there are a lot of complex tasks that you have to manage when deploying this and I'll be very honest
with you, this is beyond the scope of most developers and beyond my scope too, I'm not a system administrator.
Therefore in this module, I'll show you a managed solution, mongodb atlas is a service provided by mongodb,
by the company behind mongodb
that gives you a scalable and best practice mongodb server running in the cloud which you can
configure through a convenient interface and which you can scale up, scale down.
There is a free tier available, so you can start for free even and it gives you all these things I mentioned
on the last slide automatically,
so it does all of that for you so that you don't have to worry about that.
So let's now take a look at mongodb atlas and let's see how we can deploy a
mongodb server there and how we then can connect to it.