Serverless computing runs smaller application deployments that scale independently with demand. The platform automatically starts instances for incoming requests, stops them as traffic falls, and can scale an application to zero when unused. section 11.5.1
Scale to zero reduces payment for idle capacity but introduces cold starts: the first request must wait for a new instance to start. Applications therefore need fast startup. Quarkus supports this model through a low memory footprint, ahead-of-time compilation, and optional GraalVM native-image builds that produce smaller, faster-starting executables. section 11.5.1
Function as a Service platforms include Knative, AWS Lambda, Google Cloud Functions, and Azure Functions. Their Java APIs differ and can lock applications to one provider. Quarkus addresses this with Funqy, a unified API that abstracts the provider integrations. section 11.5.2
A minimal Funqy function
A method annotated with @Funq becomes the function invoked for a user request. Funqy also supports POJO inputs and outputs, reactive Mutiny types, and dependency injection. It exposes HTTP similarly to a REST service but does not replace complete REST functionality. section 11.5.2
Listing 11.18 The example use of the Funqy API
import io.quarkus.funqy.Funq;
public class Function {
@Funq
public String process(String input) {
return "Processed: " + input;
}
}
Shows the minimal Funqy shape: import the annotation, mark a method with @Funq, accept an input, and return the processed result. section 11.5.2








