🛠️
Wazimap technical handbook
  • Introduction
  • System Architecture
    • Database Models
    • IndicatorData
    • Geography Hierarchies
    • Choropleth Maps
    • Determine which instance to use
  • Development
    • Code Deployment
    • Component Architecture
    • Development Process
    • Pull Request Template Explanation
    • Code Review Process
    • Pull Request Template (FE)
    • Webflow Integration
    • Merging webflow exports
    • Rules for Webflow exports
    • Webflow exports & changelog
      • June 2023
      • March 2023
      • February 2023
      • December 2022
      • November 2022
      • October 2022
      • May 2022
      • April 2022
      • March 2022
      • January 2022
      • December 2021
      • November 2021
      • October 2021
    • Translation
    • Map components
  • Testing
    • Testing guidelines
    • Critical Paths
    • GUI Tests
    • Heroku Review Apps
  • Design
    • Iconography
  • Change Proposals
  • NGPx - Template
  • NGP1 - Changing the data model (Implemented)
  • NGP2 - Presenting Geographical Hierarchies to users
  • NGP3 - Change Geography Hierarchies
  • NGP4 - Format configuration
  • NGP5 - Multiple count columns
  • NGP6 - Profile-specific open graph metadata
  • NGP7 - Wazimap profile domain management
  • NGP8 - Replacing Webflow as frontend framework
  • Tutorials
    • Creating a new profile
    • Loading new geographies
    • Loading Data
    • Creating a new admin user
    • Creating a non-admin user for a private profile
    • Changing the Geography level name
    • Deployment to Dokku
  • Configuration
  • Profile Configuration
  • Profile Indicator Configuration
  • Profile Collection Configuration
  • Geographies, hierarchies and versions
  • API
    • General API Information
    • Upload API
    • Task Status
    • Point data API
Powered by GitBook
On this page

Was this helpful?

Export as PDF
  1. System Architecture

Determine which instance to use

PreviousChoropleth MapsNextCode Deployment

Last updated 4 years ago

Was this helpful?

Wazimap-NG is multi-tenanted. A single backend can host multiple profiles, e.g. and both use the same server and database.

In order to determine which profile to use, the client sends a wm-hostnameheader with this api call: /api/v1/profile_by_url/?format=jsonthis is received by the server which then matches the hostname with available profiles. You can determine which profiles are currently served by a particular backend using the following url: /api/v1/profiles/. It will return a list of profiles with their configurations, e.g.

{
    ...
    "results": [
        {
            "id": 2,
            "name": "Vulekamali",
            ...
            "configuration": {
                "urls": [
                    "geo.vulekamali.gov.za"
                ],
                ...
            }
        },
        {
            "id": 3,
            "name": "Cape Town Against Covid-19",
            ...
            "configuration": {
                "urls": [
                    "capetownagainstcovid19.openup.org.za"
                ],
                ...
            }
        },
        ...
}

In this case, when the server receives wm-hostname set to geo.vulekamali.gov.za, it returns profile 2. A single profile may match multiple urls.

https://beta.youthexplorer.org.za
http://sifar.openup.org.za