Generates realistic traffic for load testing tile servers

Related tags

Testing TileSiege
Overview

siege

Generates realistic traffic for load testing tile servers. Useful for:

  • Measuring throughput, latency and concurrency of your tile serving stack.
  • Identifying bottlenecks such as network, disk I/O, filesystem, CPU.

You could benchmark using random tiles instead, but 70% of those will be ocean.

How to use

Install siege via apt install siege or another package manager.

Create a urls.txt from anonymized tile requests to openstreetmap.org for the week of 2021-08-08:

python create_urls.py

The output urls.txt will contain 10,000 rows, with server parameters you can edit:

PROT=http
HOST=localhost
PORT=8080
PATH=
EXT=pbf
$(PROT)://$(HOST):$(PORT)/$(PATH)9/271/168.$(EXT)
$(PROT)://$(HOST):$(PORT)/$(PATH)9/264/186.$(EXT)
...

Then run your load test:

siege --file=urls.txt

The frequency distribution of zooms will match the real data:

 0 |   2122775 █
 1 |   2216794 █
 2 |   6397943 █
 3 |  12472472 ██
 4 |  16428098 ███
 5 |  27779242 █████
 6 |  38843942 ██████
 7 |  41504547 ███████
 8 |  49778705 ████████
 9 |  56767305 █████████
10 |  72384991 ███████████
11 |  71587598 ███████████
12 |  99260380 ███████████████
13 | 135358540 ████████████████████
14 | 135036605 ████████████████████
15 | 136459409 ████████████████████
16 | 102903474 ████████████████
17 |  66522472 ██████████
18 |  37851474 ██████
19 |   6217710 █

Notes

  • The sequence of requests generated will not exhibit the same spatial correlation as real users panning and zooming.
You might also like...
A modern API testing tool for web applications built with Open API and GraphQL specifications.
A modern API testing tool for web applications built with Open API and GraphQL specifications.

Schemathesis Schemathesis is a modern API testing tool for web applications built with Open API and GraphQL specifications. It reads the application s

Sixpack is a language-agnostic a/b-testing framework

Sixpack Sixpack is a framework to enable A/B testing across multiple programming languages. It does this by exposing a simple API for client libraries

Automatically mock your HTTP interactions to simplify and speed up testing

VCR.py 📼 This is a Python version of Ruby's VCR library. Source code https://github.com/kevin1024/vcrpy Documentation https://vcrpy.readthedocs.io/ R

fsociety Hacking Tools Pack – A Penetration Testing Framework
fsociety Hacking Tools Pack – A Penetration Testing Framework

Fsociety Hacking Tools Pack A Penetration Testing Framework, you will have every script that a hacker needs. Works with Python 2. For a Python 3 versi

Automatically mock your HTTP interactions to simplify and speed up testing

VCR.py 📼 This is a Python version of Ruby's VCR library. Source code https://github.com/kevin1024/vcrpy Documentation https://vcrpy.readthedocs.io/ R

Language-agnostic HTTP API Testing Tool
Language-agnostic HTTP API Testing Tool

Dredd — HTTP API Testing Framework Dredd is a language-agnostic command-line tool for validating API description document against backend implementati

Web testing library for Robot Framework

SeleniumLibrary Contents Introduction Keyword Documentation Installation Browser drivers Usage Extending SeleniumLibrary Community Versions History In

✅ Python web automation and testing. 🚀 Fast, easy, reliable. 💠
✅ Python web automation and testing. 🚀 Fast, easy, reliable. 💠

Build fast, reliable, end-to-end tests. SeleniumBase is a Python framework for web automation, end-to-end testing, and more. Tests are run with "pytes

A command-line tool and Python library and Pytest plugin for automated testing of RESTful APIs, with a simple, concise and flexible YAML-based syntax

1.0 Release See here for details about breaking changes with the upcoming 1.0 release: https://github.com/taverntesting/tavern/issues/495 Easier API t

Comments
  • An actual amount of rows added to urls.txt is not equal to the number printed by the script

    An actual amount of rows added to urls.txt is not equal to the number printed by the script

    An actual amount of rows added to urls.txt is not equal to the number printed by the script. This is the reason why:

    >>> OUTPUT_ROWS = 10000
    >>> maxzoom = 19
    >>> total_weight = 0
    >>> distribution = [2,2,6,12,16,27,38,41,49,56,72,71,99,135,135,136,102,66,37,6]
    >>> for zoom in range(maxzoom+1):
    ...     total_weight += distribution[zoom]
    ... 
    >>> actual_num_of_rows = sum([int(OUTPUT_ROWS * distribution[zoom]/total_weight) for zoom in range(maxzoom+1)])
    >>> assert OUTPUT_ROWS == actual_num_of_rows, "{} != {}".format(OUTPUT_ROWS, actual_num_of_rows)
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
    AssertionError: 10000 != 9991
    
    opened by drnextgis 2
  • limit generated URLs to a bounding box and zoom

    limit generated URLs to a bounding box and zoom

    When limiting to a bounding box, we need to change our sampling method, otherwise we will be biased towards low zoom levels. We should pre-calculate the target frequency distribution by zoom and then randomly do weighted samples within that zoom level.

    opened by bdon 0
Owner
Brandon Liu
map stuff
Brandon Liu
Scalable user load testing tool written in Python

Locust Locust is an easy to use, scriptable and scalable performance testing tool. You define the behaviour of your users in regular Python code, inst

Locust.io 15.3k Feb 8, 2021
Load Testing ML Microservices for Robustness and Scalability

The demo is aimed at getting started with load testing a microservice before taking it to production. We use FastAPI microservice (to predict weather) and Locust to load test the service (locally or on cloud). You can find detailed instructions in the Engineering MLOps book.

Emmanuel Raj 13 Jul 5, 2022
PENBUD is penetration testing buddy which helps you in penetration testing by making various important tools interactive.

penbud - Penetration Tester Buddy PENBUD is penetration testing buddy which helps you in penetration testing by making various important tools interac

Himanshu Shukla 15 Feb 1, 2022
pytest plugin for distributed testing and loop-on-failures testing modes.

xdist: pytest distributed testing plugin The pytest-xdist plugin extends pytest with some unique test execution modes: test run parallelization: if yo

pytest-dev 1.1k Dec 30, 2022
PacketPy is an open-source solution for stress testing network devices using different testing methods

PacketPy About PacketPy is an open-source solution for stress testing network devices using different testing methods. Currently, there are only two c

null 4 Sep 22, 2022
Load and performance benchmark tool

Yandex Tank Yandextank has been moved to Python 3. Latest stable release for Python 2 here. Yandex.Tank is an extensible open source load testing tool

Yandex 2.2k Jan 3, 2023
HTTP load generator, ApacheBench (ab) replacement, formerly known as rakyll/boom

hey is a tiny program that sends some load to a web application. hey was originally called boom and was influenced from Tarek Ziade's tool at tarekzia

Jaana Dogan 14.9k Jan 7, 2023
Faker is a Python package that generates fake data for you.

Faker is a Python package that generates fake data for you. Whether you need to bootstrap your database, create good-looking XML documents, fill-in yo

Daniele Faraglia 15.2k Jan 1, 2023
Hypothesis is a powerful, flexible, and easy to use library for property-based testing.

Hypothesis Hypothesis is a family of testing libraries which let you write tests parametrized by a source of examples. A Hypothesis implementation the

Hypothesis 6.4k Jan 5, 2023
Generic automation framework for acceptance testing and RPA

Robot Framework Introduction Installation Example Usage Documentation Support and contact Contributing License Introduction Robot Framework is a gener

Robot Framework 7.7k Jan 7, 2023