@@ -10,50 +10,6 @@ This document describes the URI format for defining connections between
10
10
applications and MongoDB instances in the official MongoDB :doc:`drivers
11
11
</applications/drivers>`.
12
12
13
- When you connect to a MongoDB database server, the MongoDB driver creates a
14
- connection object that is instantiated once and then reused for every
15
- operation during the lifetime of the connection.
16
- A single connection object can represent multiple connections to
17
- multiple :program:`mongod` or :program:`mongos` instances.
18
-
19
- The connection object
20
- uses the options you specify when creating the connection.
21
- The reuse of the connection object saves on the costs of setup and
22
- teardown on connections.
23
-
24
- Beginning with the Fall 2012 driver releases, MongoDB uses two new connection classes for
25
- the creation of connection objects:
26
-
27
- - ``MongoClient``: the standard connection class
28
-
29
- - ``MongoReplicaSetClient``: a connection class that some drivers use
30
- separately for :term:`replica sets <replica set>`. Not all drivers use
31
- a separate class for connections to replica sets. See the
32
- :doc:`drivers </applications/drivers>` documentation for details.
33
-
34
- In MongoDB versions prior to the Fall 2012 driver releases, the connection classes vary from driver
35
- to driver.
36
-
37
- When you start a :program:`mongod` or :program:`mongos` instance,
38
- the program displays logging
39
- information and then displays that it is waiting for a client
40
- connection, as shown in the following example.
41
-
42
- .. code-block:: none
43
-
44
- Wed Nov 21 12:56:58 [websvr] admin web console waiting for connections on port 28017
45
- Wed Nov 21 12:56:58 [initandlisten] waiting for connections on port 27017
46
-
47
- By default, MongoDB waits for connections on port 27017.
48
-
49
- You make socket connections to running :program:`mongod` or :program:`mongos` instances
50
- through a MongoDB :doc:`driver </applications/drivers>` or
51
- through the :program:`mongo` shell.
52
-
53
- .. note:: You *cannot* create a connection through HTTP on port 27017.
54
- Specifically, you *cannot* connect to MongoDB by going to
55
- ``http://localhost:27017`` in your web browser.
56
-
57
13
.. index:: connections; connection string format
58
14
.. _connections-standard-connection-string-format:
59
15
0 commit comments