You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
.. Licensed to the Apache Software Foundation (ASF) under one or more
2
+
contributor license agreements. See the NOTICE file distributed with
3
+
this work for additional information regarding copyright ownership.
4
+
The ASF licenses this file to You under the Apache License, Version 2.0
5
+
(the "License"); you may not use this file except in compliance with
6
+
the License. You may obtain a copy of the License at
7
+
8
+
.. http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+
.. Unless required by applicable law or agreed to in writing, software
11
+
distributed under the License is distributed on an "AS IS" BASIS,
12
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+
See the License for the specific language governing permissions and
14
+
limitations under the License.
15
+
16
+
===================
17
+
Partition Awareness
18
+
===================
19
+
20
+
Partition awareness allows the thin client to send query requests directly to the node that owns the queried data.
21
+
22
+
Without partition awareness, an application that is connected to the cluster via a thin client executes all queries and operations via a single server node that acts as a proxy for the incoming requests. These operations are then re-routed to the node that stores the data that is being requested. This results in a bottleneck that could prevent the application from scaling linearly.
23
+
24
+
.. image:: images/partitionawareness01.png
25
+
:alt:Without partition awareness
26
+
27
+
Notice how queries must pass through the proxy server node, where they are routed to the correct node.
28
+
29
+
With partition awareness in place, the thin client can directly route queries and operations to the primary nodes that own the data required for the queries. This eliminates the bottleneck, allowing the application to scale more easily.
30
+
31
+
.. image:: images/partitionawareness02.png
32
+
:alt:With partition awareness
33
+
34
+
Partition awareness can be enabled or disabled by setting `partition_aware` parameter in
35
+
:meth:`pyignite.client.Client.__init__` or :meth:`pyignite.aio_client.AioClient.__init__` to `True` (by default)
36
+
or `False`.
37
+
38
+
Also, it is recommended to pass list of address and port pairs of all server nodes
39
+
to :meth:`pyignite.client.Client.connect` or to :meth:`pyignite.aio_client.AioClient.connect`.
0 commit comments