Skip to content

Persistent connection #36

Description

@5lava

Most often use case in PHP is to detect a country/city of current request's IP address. In common fpm/fastcgi environment database file is re-opened and re-read on each and every request when MaxMind\Db\Reader instance is created. The idea is to keep database file opened as long as php fpm/fastcgi master process is alive. Simple tests show performance gain at least by an order of magnitude.
As as side note, database should be reloaded whenever its file size or timestamp has changed.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions