So what influences performance?
On one hand, there are things which you directly or indirectly control as a developer. You should write
efficient queries or operations in general, so inserting, finding and so on, all of that should be done
in a careful way that you only retrieve data
you need, that you insert data in the right format with the right write concerns and so on.
You should use indexes and either you have access to the database and you can create them on your own
or you need to communicate with your database admin, so that you can ensure that for the queries your
application does,
you got the right indexes to support these queries to run efficiently.
Of course a fitting data schema also is important. If you will always need to transform your data, either on
the client side or when fetching it through the aggregation framework for example,
if you need to do a lot of transformation for common queries there, then your data format as it is stored
in your collections might not be optimal and you should of course try to reach a data schema in your
database that fits your application or your use case needs.
So this is a block of factors which you can influence as a developer and as a database admin.
Now this course is for developers of course but still you should be aware of these things and talk to
your admin for things like the indexes or for the data schema to make sure that you and your admin, you
well work together to deliver the best possible application.
Now there also is another part of performance and that is mainly the part
I'll talk about in this module, the hardware and network on which you deploy your mongodb server
and database matters.
Sharding is an important concept and so are replica sets.
Now I will explain what sharding and replica sets are in this module,
they're basically about distributing data and the workload or the incoming requests
but again, I will explain them in detail
and these tasks here on the right,
the orange tasks are not really tasks you as a developer need to be involved in too much.
They are typical admin and system admin tasks, so we'll not dive too deep into that because these are
very complex matters and complex matters for separate courses on administrating servers and databases
if you want to
and not really something you as a developer have to do.
Still something you have to understand to understand the big picture of mongodb and what it's
all about.
So with that, let's dive into capped collections first which is a little bit more on the purple side
of the slide but thereafter, I'll explain what sharding is, what replica sets are and how you can efficiently
deploy your mongodb solution into the web.