A high-performance image resizing service that processes images asynchronously with caching support.
- Resize multiple images in parallel
- Asynchronous processing with job status tracking
- LRU caching for improved performance
- RESTful API with JSON responses
- Configurable timeouts and concurrency limits
POST /v1/resize[?async=true]Query Parameters:
async: (optional) When true, processes images asynchronously
Request:
{
"urls": [
"https://example.com/image1.jpg",
"https://example.com/image2.jpg"
],
"width": 200,
"height": 0
}Response:
[{
"result": "success",
"url": "http://localhost:8080/v1/image/abc123.jpeg",
"cached": false
}]GET /v1/image/{id}.jpeg- Cache: LRU cache with configurable size
- Concurrency: Worker pool pattern
- Basic Error Handling: Returns error responses for failed operations
# Build
make build
# Run tests
make test
# Start server
make run- Go 1.20+
- Go modules for dependency management