PHPackages                             yaangvu/php-eureka-client - 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. yaangvu/php-eureka-client

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

yaangvu/php-eureka-client
=========================

PHP client for the Netflix Eureka server.

v1.1.22(4y ago)16.3kMITPHPPHP ^7.4|^8.0

Since May 12Pushed 4y ago1 watchersCompare

[ Source](https://github.com/YaangVu/PHP-Eureka-Client)[ Packagist](https://packagist.org/packages/yaangvu/php-eureka-client)[ Docs](https://github.com/YaangVu/php-eureka-client)[ RSS](/packages/yaangvu-php-eureka-client/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (3)Versions (15)Used By (0)

[![Build Status](https://camo.githubusercontent.com/68805d18d6e9236cf573281989532fbe4e13246ed2d539559aa4af2c288800bc/68747470733a2f2f7472617669732d63692e6f72672f506176656c4c6f70617265762f7068702d657572656b612d636c69656e742e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/PavelLoparev/php-eureka-client)

PHP Eureka Client
=================

[](#php-eureka-client)

PHP client for the [Netflix Eureka server](https://github.com/Netflix/eureka). Supports all [Eureka REST operations](https://github.com/Netflix/eureka/wiki/Eureka-REST-operations).

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

[](#installation)

Run

```
composer require yaangvu/php-eureka-client

```

or add dependency to your composer.json file

```
"require": {
    ...
    "yaangvu/php-eureka-client": "^1.0"
}

```

Usage example
-------------

[](#usage-example)

### 1. Use needed packages

[](#1-use-needed-packages)

```
```

### 2. Create Eureka app instance

[](#2-create-eureka-app-instance)

```
// We will use app name and instance id for making requests below.
$appName = 'new_app';
$instanceId = 'test_instance_id';

// Create app instance metadata.
$metadata = new Metadata();
$metadata->set('test_key', 'test_value');

// Create data center metadata (required for Amazon only).
$dataCenterMetadata = new Metadata();
$dataCenterMetadata->set('data_center_test_key', 'data_center_test_value');

// Create data center info (Amazon example).
$dataCenterInfo = new DataCenterInfo();
$dataCenterInfo
  ->setName('Amazon')
  ->setClass('com.netflix.appinfo.AmazonInfo')
  ->setMetadata($dataCenterMetadata);

// Create data center info (Own Data Center).
$dataCenterInfo = new DataCenterInfo();
$dataCenterInfo
  ->setName('MyOwn')
  ->setClass('com.netflix.appinfo.MyDataCenterInfo');

// Create Eureka app instance.
$instance = new Instance();
$instance
  ->setInstanceId($instanceId)
  ->setHostName('test_host_name')
  ->setApp($appName)
  ->setIpAddr('127.0.0.1')
  ->setPort(80)
  ->setSecurePort(433)
  ->setHomePageUrl('http://localhost')
  ->setStatusPageUrl('http://localhost/status')
  ->setHealthCheckUrl('http://localhost/health-check')
  ->setSecureHealthCheckUrl('https://localhost/health-check')
  ->setVipAddress('test_vip_address')
  ->setSecureVipAddress('test_secure_vip_address')
  ->setMetadata($metadata)
  ->setDataCenterInfo($dataCenterInfo);
```

### 3. Create Eureka client

[](#3-create-eureka-client)

```
// Eureka client usage example.
// Create guzzle client.
$guzzle = new Client();

// Create eureka v2 client.
$eurekaClient = new EurekaClient('localhost', 8080, $guzzle);

// Create eureka v1 client.
$eurekaClient = new EurekaClient('localhost', 8080, $guzzle, 'eureka');
```

### 4. Make requests

[](#4-make-requests)

```
try {
  // Register new application instance.
  $response = $eurekaClient->register($appName, $instance);

  // Query for all instances.
  $allApps = $eurekaClient->getAllApps();

  // Query for all application instances.
  $app = $eurekaClient->getApp($appName);

  // Query for a specific application instance.
  $appInstance = $eurekaClient->getAppInstance($appName, $instanceId);

  // Query for a specific instance.
  $instance = $eurekaClient->getInstance($instanceId);

  // Send application instance heartbeat.
  $response = $eurekaClient->heartBeat($appName, $instanceId);

  // Take instance out of service.
  $response = $eurekaClient->takeInstanceOut($appName, $instanceId);

  // Put instance back into service.
  $response = $eurekaClient->putInstanceBack($appName, $instanceId);

  // Update metadata.
  $response = $eurekaClient->updateAppInstanceMetadata($appName, $instanceId, [
    'new_key' => 'new_value',
  ]);

  // Query for all instances under a particular vip address/
  $instances = $eurekaClient->getInstancesByVipAddress('test_vip_address');

  // Query for all instances under a particular secure vip address.
  $instances = $eurekaClient->getInstancesBySecureVipAddress('test_secure_vip_address');

  // De-register application instance.
  $response = $eurekaClient->deRegister($appName, $instanceId);
}
catch (Exception $e) {
  echo $e->getMessage() . PHP_EOL;
}
```

Fork from
---------

[](#fork-from)

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity23

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 56.3% 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 ~3 days

Recently: every ~8 days

Total

14

Last Release

1794d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/fc6edb5366277d97ecfedc77bcfbf41f49be74ccb182f6c2d04e597640d0c15c?d=identicon)[YaangVu](/maintainers/YaangVu)

---

Top Contributors

[![PavelLoparev](https://avatars.githubusercontent.com/u/9624816?v=4)](https://github.com/PavelLoparev "PavelLoparev (18 commits)")[![YaangVu](https://avatars.githubusercontent.com/u/14012135?v=4)](https://github.com/YaangVu "YaangVu (13 commits)")[![dzikimarian](https://avatars.githubusercontent.com/u/9393341?v=4)](https://github.com/dzikimarian "dzikimarian (1 commits)")

---

Tags

eurekaNetflix-eurekaeureka client

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/yaangvu-php-eureka-client/health.svg)

```
[![Health](https://phpackages.com/badges/yaangvu-php-eureka-client/health.svg)](https://phpackages.com/packages/yaangvu-php-eureka-client)
```

###  Alternatives

[illuminate/http

The Illuminate Http package.

11936.0M5.1k](/packages/illuminate-http)[fluffy/php-eureka-client

PHP client for the Netflix Eureka server.

3137.9k](/packages/fluffy-php-eureka-client)[api-platform/laravel

API Platform support for Laravel

59126.4k6](/packages/api-platform-laravel)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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