How geoserver/geoserver-cloud works
1. What this repository is
This is a multi-module Maven monorepo for GeoServer Cloud, a cloud-native decomposition of GeoServer into independently deployable Spring Boot services. The code is organized around reusable platform libraries, service applications, catalog/storage backends, GeoWebCache, and a large set of optional extensions.
2. Top-level runtime shape
At runtime there are three main kinds of processes:
- Edge/infrastructure services: gateway, config service, and supporting runtime pieces.
- GeoServer functional services: separate apps for WMS, WFS, WCS, WPS, REST config, Web UI, and GeoWebCache.
- Shared backend services: catalog persistence, event propagation, and optional external stores like PostgreSQL and blob stores.
3. Bootstrap and shared platform modules
src/starter/* and src/main/* provide the common bootstrapping layer:
- Spring Boot/Spring Cloud auto-configuration
- servlet and reactive web startup support
- GeoServer main security and update-sequence wiring
- observability helpers like MDC propagation and access logging
These modules are not standalone apps; they are the base building blocks imported by the service modules.
4. Gateway boundary
src/apps/infrastructure/gateway-webmvc and gateway-webflux are the ingress layer. They terminate client requests, apply routing rules, security headers, shared-auth propagation, and request rewriting before forwarding traffic to downstream services. The gateway has custom route predicates/filters for base-path stripping, profile-based routing, and shared authentication.
5. Central configuration service
src/apps/infrastructure/config is a dedicated config server-like application. It centralizes environment/service configuration and is paired with src/config/spring-factory and src/config/spring-boot-simplejndi, which adapt legacy-style XML/JNDI configuration into Spring Boot-friendly startup behavior.
6. GeoServer service applications
src/apps/geoserver/* contains the deployable business services:
- wms, wfs, wcs, wps: protocol-specific OWS services
- restconfig: REST administration/configuration service
- webui: browser-based admin UI
- gwc: GeoWebCache-facing application
These apps are intentionally thin; most behavior is pulled in through shared catalog, configuration, security, and extension modules.
7. Catalog subsystem
src/catalog/* is the core state-management area. It splits into:
- plugin: GeoServer-side catalog abstraction, repository facade, validation, locking, and resolving/proxy support
- cache: in-memory caching decorators around catalog and GeoServer facades
- events: lifecycle/config/catalog event model plus local and remote event integration
- backends/datadir: shared filesystem data-directory backend
- backends/pgconfig: PostgreSQL-backed catalog/config backend
- jackson-bindings/*: serialization/deserialization of GeoServer catalog/config/filter objects
The main flow is: service code interacts with catalog facades; facades may be cached; changes are persisted either to the data directory or PostgreSQL backend; events are emitted to keep other services consistent.
8. Catalog backend distinction
The repository supports two primary catalog persistence modes:
- Data directory backend: filesystem-based, with lock providers and eventual-consistency helpers.
- PGConfig backend: PostgreSQL-backed catalog/config store with repositories, migrations, SQL query builders, and resource-store synchronization.
This backend choice is a major architectural boundary because it changes persistence, locking, and sync behavior without changing service APIs.
9. GeoWebCache subsystem
src/gwc/* mirrors the catalog structure for tile caching:
- core: GWC core repository/configuration and tile-layer catalog abstractions
- backends/pgconfig: PostgreSQL-backed tile layer catalog
- blobstores: S3, Azure, and Google Cloud Storage blob-store integrations
- autoconfigure: conditional wiring of core services, REST/WMS/WMTS integrations, disk quota, and blob stores
- integration-bus: remote event propagation for cache and tile-layer changes
The data flow here is from GeoServer/GWC configuration into tile-layer metadata, quota state, and optional remote object storage.
10. Eventing and distributed coordination
Two event layers are important:
- Catalog events in src/catalog/events for local/remote config and lifecycle changes.
- GeoWebCache events in src/gwc/integration-bus for tile-layer, gridset, blob-store, and config-change propagation.
These modules form the consistency mechanism across independently scaled services, and they are the bridge to the project’s distributed-event infrastructure.
11. Extensions are capability slices, not one monolith
src/extensions/* contains optional feature modules that plug into the base services via auto-configuration. They are grouped by capability:
- security: LDAP, JDBC, auth-key, gateway shared-auth, ACL, environment admin
- input/output formats: COG, PMTiles, GeoParquet, FlatGeobuf, DXF, vector tiles
- styling and misc: CSS styling, Mapbox styling, control-flow, importer, OGC API, etc.
Each extension is conditionally activated, so the architecture is modular and feature flags/auto-configuration determine what each service actually loads.
12. Security model
Security is layered:
- gateway-level shared authentication and pre-auth filters
- service-level authentication providers and ACL integration
- optional identity backends such as JDBC, LDAP, and auth-key
The repo also contains service-specific security helpers for Web UI and REST config, indicating that security concerns are split between the edge and the service boundaries.
13. Operational/deployment boundary
The compose/ and docker-build/ trees define the runnable system topology for development and CI: gateway, service apps, config, PostgreSQL, pgbouncer, monitoring, and secrets. The docs/ tree includes Helm/Kubernetes deployment material and generated architecture diagrams, which strongly suggests the repo is designed to be diagrammed as a set of deployable containers with shared infrastructure, not as a single app.
14. How to draw the architecture
A useful diagram would show:
- clients entering through the gateway
- requests routed to WMS/WFS/WCS/WPS/REST/UI/GWC services
- those services depending on shared starter/platform modules
- state flowing to either Data Directory or PGConfig/PostgreSQL
- change events flowing through the event bus / remote-event modules
- GeoWebCache additionally connecting to blob stores and quota/storage backends
- optional extensions hanging off the service layer as conditional capabilities
Main entry points: gateway-webmvc Gateway MVC · plugin Catalog Plugin · extensions Extensions · autoconfigure GWC AutoConfig
Components 34
Infrastructure
Ingress, config, and runtime scaffolding services.
- Gateway MVC · Servlet-based ingress with routing, filtering, headers, and shared auth.
src/apps/infrastructure/gateway-webmvc - Gateway Flux · Reactive ingress variant with routing and shared authentication support.
src/apps/infrastructure/gateway-webflux - Config Service · Centralized service/environment configuration application.
src/apps/infrastructure/config
GeoServer services
Deployable protocol and admin applications.
- WMS · Deployable WMS service application.
src/apps/geoserver/wms - WFS · Deployable WFS service application.
src/apps/geoserver/wfs - WCS · Deployable WCS service application.
src/apps/geoserver/wcs - WPS · Deployable WPS service application.
src/apps/geoserver/wps - REST Config · REST administration and configuration service.
src/apps/geoserver/restconfig - Web UI · Browser-based admin console and service registry UI.
src/apps/geoserver/webui
Catalog state
Catalog, persistence, cache, and eventing layers.
- Catalog Plugin · Core catalog abstractions, validation, resolving, locking, and repository facade.
src/catalog/plugin - Catalog Cache · In-memory catalog and GeoServer facade caching layer.
src/catalog/cache - Catalog Events · Lifecycle, config, and remote catalog event bridge.
src/catalog/events - Data Directory · Filesystem-backed catalog persistence, locking, and eventual-consistency support.
src/catalog/backends/datadir - PGConfig · PostgreSQL-backed catalog and config store with repositories and migrations.
src/catalog/backends/pgconfig
GeoWebCache
Tile cache core, backends, storage, and event propagation.
- GeoWebCache App · GeoWebCache-facing application shell.
src/apps/geoserver/gwc - GWC Core · Tile-layer catalog, request path handling, and core repository wiring.
src/gwc/core - GWC AutoConfig · Conditional wiring for services, integrations, quota, and blob stores.
src/gwc/autoconfigure - GWC PGConfig · PostgreSQL-backed tile-layer catalog and quota state.
src/gwc/backends/pgconfig - Blob Stores · S3, Azure, and Google Cloud Storage integrations for cached tiles.
src/gwc/blobstores - GWC Bus · Distributed change propagation for tile layers, gridsets, and blob stores.
src/gwc/integration-bus
Shared platform
Common bootstrapping, web, and observability modules.
- Spring Boot · Common application launcher and service startup wiring.
src/starters/spring-boot - Web MVC · Servlet context and GeoServer main bootstrapping support.
src/starters/webmvc - Observability · MDC propagation, access logging, and request-scoped logging helpers.
src/starters/observability - Main Runtime · GeoTools HTTP client, main security, update-sequence, and loader wiring.
src/main/src/main/java/org/geoserver/cloud/autoconfigure/main
Extensions
Conditional capability slices added to service runtimes.
- Extensions · Conditional add-ons that plug into the service layer via auto-configuration.
src/extensions - Security Slices · LDAP, JDBC, auth-key, ACL, gateway shared-auth, and admin auth extensions.
src/extensions/security - Format Slices · Optional input/output format support such as COG, PMTiles, vector tiles, and DXF.
src/extensions/input-formats - Style Slices · Styling and presentation extensions such as CSS and Mapbox styling.
src/extensions/css-styling - OGC API · OGC API feature support and related bindings.
src/extensions/ogcapi/features - Control Flow · Control-flow extension with bootstrap and runtime behavior.
src/extensions/control-flow
Deploy
Container, compose, and documentation topology.
- Deploy Assets · Compose, Docker, Helm, and generated docs for runnable topologies.
compose
Other components
- Clients · Browsers, API clients, and operator traffic entering the system.
- PostgreSQL · Relational store used by PGConfig and GWC backends.
- Object Storage · S3, Azure, and GCS backends used by GeoWebCache blob stores.
Connections 48
- Clients → Gateway MVC: requests · Servlet ingress path for client traffic.
- Clients → Gateway Flux: requests · Reactive ingress path for client traffic.
- Gateway MVC → WMS: routes to · Forwards protocol traffic to service apps.
- Gateway MVC → WFS: routes to · Forwards protocol traffic to service apps.
- Gateway MVC → WCS: routes to · Forwards protocol traffic to service apps.
- Gateway MVC → WPS: routes to · Forwards protocol traffic to service apps.
- Gateway MVC → REST Config: routes to · Forwards admin/config requests.
- Gateway MVC → Web UI: routes to · Forwards browser UI requests.
- Gateway Flux → GeoWebCache App: routes to · Reactive ingress can route to cache endpoints.
- Config Service → Deploy Assets: configured by · Configuration service participates in the packaged deployment topology.
- Spring Boot → Gateway MVC: boots · Shared application launcher and startup helpers.
- Spring Boot → Gateway Flux: boots · Shared application launcher and startup helpers.
- Web MVC → WMS: initializes · Servlet context and GeoServer main wiring.
- Web MVC → REST Config: initializes · Servlet context and GeoServer main wiring.
- Observability → Gateway MVC: observes · MDC and access logging for ingress services.
- Observability → WMS: observes · Request and authentication logging support.
- Main Runtime → WMS: provides runtime · Main security, update sequence, and HTTP client support.
- Main Runtime → Web UI: provides runtime · Main security, update sequence, and HTTP client support.
- WMS → Catalog Cache: reads via · Service code uses cached catalog facades.
- WFS → Catalog Cache: reads via · Service code uses cached catalog facades.
- WCS → Catalog Cache: reads via · Service code uses cached catalog facades.
- WPS → Catalog Cache: reads via · Service code uses cached catalog facades.
- REST Config → Catalog Plugin: writes via · REST config changes go through catalog facades.
- Web UI → Catalog Plugin: administers · Web UI manipulates catalog and service state.
- Catalog Cache → Catalog Plugin: wraps · Caching decorators sit in front of catalog facades.
- Catalog Plugin → Data Directory: persists to · Filesystem backend option for catalog/config state.
- Catalog Plugin → PGConfig: persists to · PostgreSQL backend option for catalog/config state.
- Catalog Plugin → Catalog Events: emits · Catalog lifecycle and config events propagate changes.
- Catalog Events → GWC Bus: bridges to · Remote event infrastructure shares change notifications.
- Data Directory → Catalog Events: publishes · Data-directory backend participates in local/remote events.
- PGConfig → PostgreSQL: stores in · Repositories and migrations use PostgreSQL.
- PGConfig → Catalog Events: publishes · Backend changes feed catalog and lifecycle events.
- GeoWebCache App → GWC AutoConfig: configures · Application shell imports conditional GWC wiring.
- GWC AutoConfig → GWC Core: wires · Core tile-layer catalog and request handling.
- GWC AutoConfig → GWC PGConfig: wires · Optional PostgreSQL-backed tile catalog.
- GWC AutoConfig → Blob Stores: wires · Optional object-store integrations.
- GWC AutoConfig → GWC Bus: wires · Distributed cache/event propagation support.
- GWC PGConfig → PostgreSQL: stores in · Tile-layer catalog and quota state persist to PostgreSQL.
- Blob Stores → Object Storage: stores in · Blob-store adapters target external object storage.
- GWC Bus → Catalog Events: syncs with · Cross-service change propagation aligns GWC and catalog state.
- Extensions → Security Slices: includes · Capability slice family.
- Extensions → Format Slices: includes · Capability slice family.
- Extensions → Style Slices: includes · Capability slice family.
- Extensions → OGC API: includes · Capability slice family.
- Extensions → Control Flow: includes · Capability slice family.
- Security Slices → Gateway MVC: enhances · Shared-auth and security integrations affect ingress.
- Security Slices → Web UI: enhances · Optional auth backends and ACL helpers.
- Security Slices → REST Config: enhances · Optional auth backends and ACL helpers.