| // Licensed to the Apache Software Foundation (ASF) under one or more |
| // contributor license agreements. See the NOTICE file distributed with |
| // this work for additional information regarding copyright ownership. |
| // The ASF licenses this file to You under the Apache License, Version 2.0 |
| // (the "License"); you may not use this file except in compliance with |
| // the License. You may obtain a copy of the License at |
| // |
| // http://www.apache.org/licenses/LICENSE-2.0 |
| // |
| // Unless required by applicable law or agreed to in writing, software |
| // distributed under the License is distributed on an "AS IS" BASIS, |
| // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| // See the License for the specific language governing permissions and |
| // limitations under the License. |
| Partition awareness allows the thin client to send query requests directly to the node that owns the queried data. |
| |
| 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. |
| |
| image::images/partitionawareness01.png[Without Partition Awareness] |
| |
| Notice how queries must pass through the proxy server node, where they are routed to the correct node. |
| |
| 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. |
| |
| image::images/partitionawareness02.png[With Partition Awareness] |
| |
| [WARNING] |
| ==== |
| [discrete] |
| Note that presently you need to provide addresses of all the server nodes in the connection properties. |
| This also means that if a new server node joins the cluster, you should add the server's address to the connection properties and reconnect the thin client. |
| Otherwise, the thin client will not be able to send direct requests to this server. |
| This limitation is planned to be addressed before the GA release of the feature. |
| ==== |
| |
| |
| |