Skip to content

EveryBuy/ping-service

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

🚀 Ping Service | EveryBuy UA

Java Spring Boot Maven

Ping Service is a utility microservice within the EveryBuy ecosystem designed to maintain the availability of other services. Its primary goal is to prevent "cold starts" or service suspension on free hosting platforms (like Render, Railway, or Koyeb) by sending periodic heartbeat requests.


📋 Features

  • Keep-Alive Pings: Automatically sends requests to core microservices every 5 minutes.
  • Health Monitoring: Specifically monitors the /actuator/health endpoint for the Advertisement Service.
  • Centralized Scheduling: Manages wake-up calls for multiple services (User, Auth, Chat, and Gateway) from a single point.
  • Detailed Logging: Provides real-time insights into service availability and HTTP error codes.

🏗️ Tech Stack

  • Core: Spring Boot 4.0.2
  • Runtime: Java 21
  • HTTP Client: Spring RestClient
  • Utilities: Lombok (Slf4j, RequiredArgsConstructor)
  • Task Management: Spring @Scheduled tasks

⚙️ Configuration

The service relies on environment variables to locate target microservices. These should be defined in your application.properties or system environment:

Property Target Service Target Endpoint
ads.service.url Advertisement Service /actuator/health
user.service.url User Service /keep-alive
auth.service.url Auth Service /keep-alive
chat.service.url Chat Service /keep-alive
api.gateway.url API Gateway /keep-alive

🚀 Getting Started

Prerequisites

  • JDK 21
  • Maven 3.9+

Build and Run

  1. Clone the repository:
    git clone [https://github.com/everybuy-ua/ping-service.git](https://github.com/everybuy-ua/ping-service.git)

About

Service that periodically sends requests to keep other servers awake and monitor their health

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors