Private Service - Replov Docs
Skip to main content

Private Service

Internal network-only services without public internet access

Private Services run on your internal network and are not exposed to the public internet. Perfect for internal APIs, microservices, and backend services that should only be accessible within your infrastructure.

Perfect For

  • Internal APIs and microservices
  • Database management services
  • Backend services for mobile apps
  • Admin panels and internal tools

Key Features

No public internet exposure
Internal network communication only
Enhanced security for sensitive services
Lower cost (no bandwidth charges)
Network Access
Private Services are only accessible from other services within your Replov project. They cannot be accessed from the public internet.

Example: Internal API Service

server.jsjavascript
const express = require('express');
const app = express();
app.use(express.json());
// Internal API endpoint
app.get('/api/internal/users', async (req, res) => {
// Only accessible from other services in your project
const users = await db.query('SELECT * FROM users');
res.json({ users });
});
app.post('/api/internal/process', async (req, res) => {
// Process data from other services
const result = await processData(req.body);
res.json({ result });
});
const PORT = process.env.PORT || 3000;
app.listen(PORT, '0.0.0.0', () => {
console.log(`Private service running on port ${PORT}`);
});

Service-to-Service Communication

Other services in your project can communicate with your Private Service using its internal hostname:

frontend-service.jsjavascript
// From another service in your project
const axios = require('axios');
// Use the private service's internal hostname
const PRIVATE_API = process.env.PRIVATE_SERVICE_URL || 'http://my-private-service:3000';
async function fetchInternalData() {
try {
const response = await axios.get(`${PRIVATE_API}/api/internal/users`);
return response.data;
} catch (error) {
console.error('Failed to fetch from private service:', error);
throw error;
}
}
Environment Variables
Set the private service URL as an environment variable in your other services for easy configuration.

Deployment Configuration

When deploying a Private Service:

  • • Service Type: Private Service
  • • Port: Your application's listening port (e.g., 3000)
  • • Network: Internal only (no public URL)
  • • Health Check: Optional internal health endpoint

Security Benefits

  • No Public Exposure: Service is completely isolated from the internet
  • Reduced Attack Surface: Only accessible from trusted services
  • Internal Authentication: Can use simpler auth for internal-only APIs
  • Compliance: Easier to meet security compliance requirements

Pricing

Private Services are billed based on compute resources only (no bandwidth charges):

  • • Nano Compute: ₹199 per service / 30 days - 512MB RAM
  • • Micro: ₹0.83/hour - 1GB RAM
  • • Small: ₹1.67/hour - 2GB RAM
  • • Medium: ₹3.33/hour - 4GB RAM
Private Services don't incur bandwidth charges since they're not exposed to the public internet.

Common Use Cases

Internal API Gateway

Centralized API for microservices communication

Database Proxy

Connection pooling and query optimization layer

Cache Service

Redis or Memcached wrapper with custom logic

Admin Backend

Internal admin operations and management