Serverless Functions

Raindrop Services

Serverless functions that actually work together. Build scalable applications with direct service communication, automatic scaling, and zero server management overhead.

Direct communication
No HTTP overhead
Automatic scaling
Service Architecture
Public API
Direct call to Inventory Service
Direct call to Payment Service
Direct call to Notification Service
No HTTP Overhead
"Service bindings enable direct method calls"

Two Types of Services

Choose the right service type for your needs

Public Services

Your application's front door

Public services are accessible via unique URLs and handle external requests. Perfect for APIs, webhooks, and user-facing functionality.

raindrop.manifest
service "my-api" {
  domain {
    cname = "my-unique-service"
  }
}
Accessible via unique URLs
Handle external requests
Perfect for APIs and webhooks

Internal Services

The secret sauce

Internal services don't need public URLs—they're designed to be called by other services within your application using direct method calls.

raindrop.manifest
service "inventory" {}
service "payments" {}
service "notifications" {}
No public URLs needed
Direct method calls
Zero HTTP overhead

Service Bindings in Action

See how services communicate directly without HTTP overhead

Direct Service Communication

Service A (Public)
export default class extends Service<Env> {
  async fetch(request: Request): Promise<Response> {
    // Direct call to internal service
    const response = await this.env.SERVICE_B.processData({
      userId: getUserId(request)
    });
    return response;
  }
}
Service B (Internal)
export default class extends Service<Env> {
  async fetch(request: Request): Promise<Response> {
    return new Response("not found", { status: 404 });
  }

  async processData(input: any): Promise<Response> {
    // Your business logic here
    return new Response("Processed successfully");
  }
}

What's Missing?

No URLs or HTTP calls
No authentication headers
No HTTP status handling
No network latency

What You Get

Direct method calls
Automatic service discovery
Built-in load balancing
Graceful failure handling

Clean Architecture Made Simple

Structure applications with clear separation between public interfaces and internal business logic

Application Structure

raindrop.manifest
application "store" {
  // Public-facing services
  service "api" {
    domain { cname = "store-api" }
  }
  service "admin" {
    domain { cname = "admin-panel" }
  }

  // Internal services
  service "inventory" {}
  service "payments" {}
  service "notifications" {}
}

Service Flow

1
Public API receives request
Validates input and coordinates flow
2
Calls Inventory Service
Checks product availability
3
Calls Payment Service
Processes payment securely
4
Calls Notification Service
Sends confirmation email

Microservices Without the Complexity

Get all the benefits of microservices without the operational overhead

Independent Scaling

Each service scales automatically based on demand. No manual capacity planning required.

Easy Deployment

Deploy services independently. Update one service without affecting others.

Pay for What You Use

Only pay for the compute time your services actually consume. No idle server costs.

Ready to transform your data

Start building today!