Skip to content

Commit

Permalink
Merge pull request #3408 from mapfish/improve_scaling_documentation
Browse files Browse the repository at this point in the history
Documentation: improve instructions for scaling configuration
  • Loading branch information
jwkaltz authored Sep 13, 2024
2 parents 2fcdebf + 213bb0e commit 1256357
Showing 1 changed file with 21 additions and 6 deletions.
27 changes: 21 additions & 6 deletions docs/src/main/resources/templates/scaling.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,13 @@ <h4 id="scaling_solus">
<a class="headerlink" href="#scaling_solus" title="Permalink to this headline"></a>
</h4>
<p>
To store the state we use a PostgreSQL database, the database connection should be configured with the
following Java system properties:
MapFish-Print's horizontal scaling solution is based on storing states in a database, for example
PostgreSQL. To enable this mode, the file
<code>mapfish-spring-application-context-override-db.xml</code> must be copied to
<code>mapfish-spring-application-context-override.xml</code> and database connection parameters must be
configured (see below).
</p>
<p>The database connection must be configured with the following Java system properties:</p>

<ul>
<li><code>db.host</code>: The database server host name</li>
Expand All @@ -25,12 +29,11 @@ <h4 id="scaling_solus">
</ul>

<p>
The schema should exist, and the necessary tables are created automatically (<code>print_accountings</code>,
<code>print_job_results</code>, <code>print_job_statuses</code>). In this mode, the container will wait for
the database to be reachable before actually starting the tomcat server.
The schema must exist, and the necessary tables are created automatically (<code>print_accountings</code>,
<code>print_job_results</code>, <code>print_job_statuses</code>)
</p>

<p>The DB polling can be tuned with these two environment variables:</p>
<p>Database polling can be tuned with these two environment variables:</p>
<ul>
<li>
<code>PRINT_CANCEL_OLD_POLL_INTERVAL</code>: How often in seconds the DB is polled for jobs to be canceled
Expand All @@ -43,6 +46,18 @@ <h4 id="scaling_solus">
</li>
</ul>

<h5 ud="docker_image">
Existing MapFish-Print Packages
<a class="headerlink" href="#docker_image" title="Permalink to this headline"></a>
</h5>
<p>
Existing MapFish-Print distribution packages may already contain functionality to ease the setup of
horizontal scaling. For example, if you use the Docker image
https://hub.docker.com/r/camptocamp/mapfish_print), you do not need to manually rename the file mentioned
above, and a startup script contains functionality to verify database availability before the application
server is started.
</p>

<h5 id="scaling_docker">
Docker
<a class="headerlink" href="#scaling_docker" title="Permalink to this headline"></a>
Expand Down

0 comments on commit 1256357

Please sign in to comment.