comparison Sphinx/source/faq/scalability.rst @ 440:86bf70a1f570

scalability: latency
author Alain Mazy <alain@mazy.be>
date Wed, 27 May 2020 12:24:44 +0200
parents 5d6d593bceb6
children c2ae93c562d2
comparison
equal deleted inserted replaced
439:76b7279e52e6 440:86bf70a1f570
173 ^^^^^^^^^^^^^^^^^^^^^^^^^^ 173 ^^^^^^^^^^^^^^^^^^^^^^^^^^
174 174
175 As of Orthanc 1.7.0, the internal code accessing the DB is still affected 175 As of Orthanc 1.7.0, the internal code accessing the DB is still affected
176 by limitations induced by the SQLite engine that was the only one originally 176 by limitations induced by the SQLite engine that was the only one originally
177 available at the beginning of the project: inside a single Orthanc process, 177 available at the beginning of the project: inside a single Orthanc process,
178 there are no concurrent access to the DB. 178 there is no concurrent access to the DB.
179 179
180 One solution to avoid this limitation is to have multiple Orthanc accessing 180 One solution to avoid this limitation is to have multiple Orthanc accessing
181 the same DB (works only for MySQL and PostgreSQL) as presented in this `sample 181 the same DB (works only for MySQL and PostgreSQL) as presented in this `sample
182 <https://bitbucket.org/osimis/orthanc-setup-samples/src/master/docker/multiple-orthancs-on-same-db/>`__. 182 <https://bitbucket.org/osimis/orthanc-setup-samples/src/master/docker/multiple-orthancs-on-same-db/>`__.
183 183
197 refactoring: `issue 83 197 refactoring: `issue 83
198 <https://bitbucket.org/sjodogne/orthanc/issues/83/>`__, `issue 121 198 <https://bitbucket.org/sjodogne/orthanc/issues/83/>`__, `issue 121
199 <https://bitbucket.org/sjodogne/orthanc/issues/121/>`__, `issue 151 199 <https://bitbucket.org/sjodogne/orthanc/issues/121/>`__, `issue 151
200 <https://bitbucket.org/sjodogne/orthanc/issues/151/>`__. 200 <https://bitbucket.org/sjodogne/orthanc/issues/151/>`__.
201 201
202
203 Latency
204 ^^^^^^^
205
206 As of Orthanc 1.7.0, Orthanc still performs quite a large number of small
207 SQL requests. A simple request to a route like ``/studies/{id}`` can trigger
208 6 SQL queries.
209
210 This is not an ideal situation and this might be addressed
211 in a future larger DB refactoring (the most time-consuming queries have already
212 been optimized). Given the large number of round-trips
213 between Orthanc and the DB server, it's important that the latency is reduced
214 as much as possible. I.e, if deploying Orthanc in a cloud infrastructure,
215 make sure that the DB server and Orthanc VMs are located in the same datacenter.
216
217 Typically, a latency of 1-4 ms is expected to have correct performances. If your
218 latency is 20ms, a simple request to ``/studies/{id}`` might spend 120ms in
219 round-trip alone.
220
221
222
223