PHPackages                             mt-olympus/metis - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [HTTP &amp; Networking](/categories/http)
4. /
5. mt-olympus/metis

ActiveLibrary[HTTP &amp; Networking](/categories/http)

mt-olympus/metis
================

Load Balance implementation in PHP

1.1.1(6y ago)024.3kMITPHPPHP ^7.1

Since Dec 14Pushed 6y ago1 watchersCompare

[ Source](https://github.com/mt-olympus/metis)[ Packagist](https://packagist.org/packages/mt-olympus/metis)[ Docs](https://github.com/mt-olympus/metis)[ RSS](/packages/mt-olympus-metis/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependencies (4)Versions (10)Used By (0)

Metis
=====

[](#metis)

Introduction
------------

[](#introduction)

This is a Dynamic Routing and Load Balance library made with PHP.

It's goal is to "choose" an endpoint to connect to in distributed systems, like in a micro service architeture.

You can use this library with [Athena](https://github.com/mt-olympus/athena) server, that can returns more than one server and use this module to choose one of them based on some rules and statistics about the servers.

You can inject a Metis instance to a [Hermes](https://github.com/mt-olympus/hermes), and it will automatically choose a server to connect to. More info on the Hermes documentation.

Components
----------

[](#components)

- Service list
- Rule

### Service list

[](#service-list)

- Static: from a configuration file
- Fetched: from a remote server

The fetched method is available through one of the following libraries:

- [metis-athena](https://github.com/mt-olympus/metis-athena): Fetches the list from a [Athena](https://github.com/mt-olympus/athena) (Service Discovery) service
- [metis-demeter](https://github.com/mt-olympus/metis-demeter): Fetches the list from a [Demeter](https://github.com/mt-olympus/demeter) (Distributed Configuration) service

#### Static server list

[](#static-server-list)

The list is an well formed array:

```
return [
    'metis' => [
        'services' => [
            'service1' => [ // a unique service identification
                [
                    'host' => 'server1',
                    'uri' => 'http://192.168.1.2/v1/service1',
                ],
                [
                    'host' => 'server2',
                    'uri' => 'https://server2/v1/service1',
                ],
                [
                    'host' => 'server3',
                    'uri' => 'https://server3.mycompany.com:7001/v1/service1',
                ],
            ],
            'service2' => [ // a unique service identification
                [
                    'host' => 'server1',
                    'uri' => 'http://192.168.1.2:7002/v1/service2',
                ],
            ],
        ],
    ],
];
```

### Strategy

[](#strategy)

Regardless the chosen strategy, if there is a [Cerberus](https://github.com/mt-olympus/cerberus) (Circuit Breaker) attached, the unavailable services will be filtered.

- RoundRobin: Cycles among the services in a specific order
- Random: Each time will select a random service from the list
- ResponseTime: Each service has it's response time measured and this time is weighted. The faster service have more probability to be chosen.

Installation
------------

[](#installation)

```
composer require mt-olympus/metis

```

### Zend Expressive

[](#zend-expressive)

Just copy the `config/metis.global.php.dist` to your expressive project as config/autoload/metis.global.php

### Zend Framework

[](#zend-framework)

Include the module in your application.config.php

###  Health Score

31

—

LowBetter than 66% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~220 days

Recently: every ~375 days

Total

8

Last Release

2307d ago

Major Versions

0.9.3 → 1.0.02016-07-22

PHP version history (3 changes)0.9.0PHP ^5.5|^7.0

1.0.0PHP ^5.6 || ^7.0

1.1.0PHP ^7.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/5b54dffc1ebcb317a0cf825a781ab6c5f30980e9abd0d0a3f9c68830cb05c014?d=identicon)[Lansoweb](/maintainers/Lansoweb)

---

Top Contributors

[![Lansoweb](https://avatars.githubusercontent.com/u/2109813?v=4)](https://github.com/Lansoweb "Lansoweb (21 commits)")

### Embed Badge

![Health badge](/badges/mt-olympus-metis/health.svg)

```
[![Health](https://phpackages.com/badges/mt-olympus-metis/health.svg)](https://phpackages.com/packages/mt-olympus-metis)
```

###  Alternatives

[magento/community-edition

Magento 2 (Open Source)

12.1k53.0k12](/packages/magento-community-edition)[laminas/laminas-validator

Validation classes for a wide range of domains, and the ability to chain validators to create complex validation criteria

16348.2M212](/packages/laminas-laminas-validator)[laminas/laminas-router

Flexible routing system for HTTP and console applications

3521.9M74](/packages/laminas-laminas-router)[wheelpros/fitment-platform-api

Magento 2 (Open Source)

12.1k1.2k](/packages/wheelpros-fitment-platform-api)[shlinkio/shlink

A self-hosted and PHP-based URL shortener application with CLI and REST interfaces

5.1k4.9k](/packages/shlinkio-shlink)[mezzio/mezzio-tooling

Migration and development tooling for Mezzio

191.2M22](/packages/mezzio-mezzio-tooling)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
