Controlled Failure Handling in Ballerina with check and error
Use Ballerina's error type and check keyword to make network failures explicit at compile time instead of handling them as runtime surprises.
ReadMeFeed / Community knowledge
Real questions. Useful conversations. Find the people who know your stack.
Use Ballerina's error type and check keyword to make network failures explicit at compile time instead of handling them as runtime surprises.
Ballerina’s native gRPC connector turns a single .proto file into fully typed client and server stubs, eliminating boilerplate and keeping your service definition in sync with the API contract. Learn how to generate, implement, and test a gRPC service in minutes.
Eliminate request blocking in microservices by using Ballerina's lightweight workers and channels for non-blocking background processing.
Learn when to reuse a single Ballerina http:Client instance for connection pooling and when creating a client per request may be acceptable, with a decision table, trade‑off analysis, and sample code.
Ballerina's sum-type error model and native fault-tolerance constructs make errors explicit in the type system and encode retry, timeout, and circuit-breaker policies into service bindings, shaping resilient trust boundaries and failure domains.
When serving files >1 GB or handling high‑throughput uploads, Ballerina offers two patterns: stream‑based HTTP or in‑memory buffering. This guide compares constraints, trade‑offs, and shows a concrete implementation and validation workflow.
Learn how to manage HTTP request-response cycles in Ballerina, balancing automatic serialization with the manual control of the http:Caller object for custom status codes.
Learn how to use Ballerina workers to offload CPU-intensive tasks from the main event loop, utilizing futures for asynchronous results and locks for thread safety.
Learn how to build resilient JSON REST endpoints in Ballerina using the built-in HTTP service model and @retry annotations to handle transient failures.