Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation: improve instructions for scaling configuration #3408

Merged
merged 3 commits into from
Sep 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading