April 2023 Summaries
3 posts from Svix
Filter
Month:
Year:
Post Summaries
Back to Blog
Receiving Webhooks is a crucial aspect of integrating with third-party services, allowing developers to automate their workflows and stay up-to-date with changes in real-time. Webhooks are essentially POST requests to a preset endpoint, used by services to notify each other of events. To receive webhooks successfully, it's essential to implement proper security measures, such as verifying the origin of the message through signature validation. In this tutorial, we'll set up a Supabase Edge Function to receive a webhook from Svix and validate the webhook signature. We'll cover the basics of webhook verification, including calculating the expected signature using HMAC with SHA-256, and implementing a try/catch block to handle returning the correct response based on whether the signature matches our expected signature.
Apr 20, 2023
946 words in the original blog post.
The use of mutual TLS authentication (mTLS) for webhook authentication is not recommended due to its complexity, compatibility issues, and scalability concerns. It can lead to additional security measures being required, such as client certificates per customer, which can be vulnerable to manipulation. In contrast, webhook signatures offer a simpler, more compatible, and scalable alternative that can help ensure the integrity and authenticity of webhook payloads without the headaches associated with mTLS.
Apr 11, 2023
788 words in the original blog post.
The author investigated a mysterious memory usage pattern in their Rust service, which would exhibit a "stair-step" profile with sharp increases in memory usage under load. The issue was found to be caused by heap fragmentation, a problem where the allocator adds and removes values of varying sizes over time, leading to gaps in the heap that cause new blocks of memory to be allocated to accommodate larger values. To mitigate this issue, the author switched to using jemalloc, an allocator that goes out of its way to avoid fragmentation, resulting in a more stable memory profile with less "lost" memory. The change had a positive impact on the service's performance and responsiveness under load.
Apr 04, 2023
1,602 words in the original blog post.