ByteByteGo 02月09日
EP149: JWT 101: Key to Stateless Authentication
index_new5.html
../../../zaker_core/zaker_tpl_static/wap/tpl_guoji1.html

 

本文汇总了多篇技术文章,涵盖了Rust高性能应用开发、Docker的重要性、JWT无状态身份验证、常用云服务速查表、数字签名原理以及Airbnb的架构演变等多个方面。此外,还介绍了如何在一个应用中使用20多种AI模型来提升效率。内容丰富,适合对技术有深入了解需求的开发者和架构师阅读,帮助他们快速掌握关键技术,并了解大型互联网公司的架构设计思路。

🛠️Rust开发者工作坊:提供构建和优化低延迟Rust应用的实践技巧,面向开发者、工程师和架构师,学习如何使用Rust创建和编译实际应用程序,连接到ScyllaDB(NoSQL数据存储),协商与数据建模和查询相关的权衡,以及管理和监控数据库以实现持续的低延迟。

🔑JWT 101:JWT(JSON Web Tokens)是用于在两方之间安全传输信息的开放标准,广泛用于身份验证和授权。JWT由Header、Payload和Signature三部分组成,其中Signature通过对称或非对称签名方式保证安全性。

☁️常用云服务速查表:总结了AWS、Azure、Google Cloud、Oracle Cloud和Alibaba Cloud等云服务商提供的云服务器、数据库、消息队列和流媒体平台、负载均衡、DNS路由软件以及安全监控等服务。

🔒数字签名工作原理:数字签名是一种用于签署和保护电子传输文档的特定类型的电子签名。签名者(Alice)使用私钥加密文档的哈希值,接收者(John)使用Alice的公钥解密签名,并验证哈希值是否一致,从而确保文档的完整性和真实性。

🏠Airbnb架构演进:Airbnb从一个名为Monorail的Ruby-on-Rails单体应用起步,随着业务高速增长,迁移到面向服务的架构(SOA)。SOA由数据服务、派生数据服务、中间层服务和表示服务等组成,实现了服务之间的松耦合和可扩展性。

Hands-on Rust Developer Workshop: Build and Optimize a Low-Latency Rust App (Sponsored)

Get practical tips for building high-performance Rust apps that scale.

During this free interactive workshop oriented for developers, engineers, and architects, you will learn how to:

If you’re an application developer with an interest in Rust, Tokio, and event-driven architectures, this workshop is for you! This is a great way to discover the NoSQL strategies used by top teams and apply them in a guided, supportive environment.

Register for Free


This week’s system design refresher:


System Design: Why Is Docker Important?


Generative Adversarial Network (GAN) - AI by Hand ✍️

This animation is hand drawn by Prof. Tom Yeh exclusively for the readers of the ByteByteGo Newsletter..

If you want to learn more about GAN, check out Chapter 7 in the System Design Interview book.


JWT 101: Key to Stateless Authentication

JWT or JSON Web Tokens is an open standard for securely transmitting information between two parties. They are widely used for authentication and authorization.

A JWT consists of three main components:

    Header
    Every JWT carries a header specifying the algorithms for signing the JWT. It’s written in JSON format.

    Payload
    The payload consists of the claims and the user data. There are different types of claims such as registered, public, and private claims.

    Signature
    The signature is what makes the JWT secure. It is created by taking the encoded header, encoded payload, secret key, and the algorithm and signing it.

JWTs can be signed in two different ways:

    Symmetric Signatures
    It uses a single secret key for both signing the token and verifying it. The same key must be shared between the server that signs the JWT and the system that verifies it.

    Asymmetric Signatures
    In this case, a private key is used to sign the token, and a public key to verify it. The private key is kept secure on the server, while the public key can be distributed to anyone who needs to verify the token.

Over to you: Do you use JWTs for authentication?


How I use 20+ AI models in one app

(PRESENTED BY YOU.COM)

I routinely have ChatGPT, Claude, and DeepSeek open side-by-side because each model excels at tasks that the others don't.

That’s why I like using You.com, the tool that combines the most popular AI models in one app:

Ends soon: Access 12 months of Pro at no cost ($180 value). Just visit the offer page to redeem your special offer as a ByteByteGo newsletter subscriber.


A handy cheat sheet for the most popular cloud services

What’s included?


How Digital Signatures Work?

A digital signature is a specific kind of electronic signature to sign and secure electronically transmitted documents.

Digital signatures are similar to physical signatures since they are unique to every person. They identify the identity of the signer.

Here’s an example of the working process of a digital signature with Alice as the sender and John as the recipient:

    Alice generates a cryptographic key pair consisting of a private key and a corresponding public key. The private key remains confidential and is known only to the signer, while the public key can be shared openly.

    The signer (Alice) uses a hash function to create a unique fixed-length string of numbers and letters, called a hash, from the document. This hash value represents the contents of the document.

    Alice uses their private key to encrypt the hash value of the message. This hash value is known as the digital signature.

    The digital signature is attached to the original document, creating a digitally signed document. It is transmitted over the network to the recipient.

    The recipient (John) extracts both the digital signature and the original hash value from the document.

    The recipient uses Alice’s public key to decrypt the digital signature. This produces a hash value that was originally encrypted with the private key.

    The recipient calculates a new hash value for the received message using the same hashing algorithm as the signer. They then compare this recalculated hash with the decrypted hash value obtained from the digital signature.

    If the hash values are equal, the digital signature is valid, and it is determined that the document has not been tampered with or altered.

Over to you: Have you used digital signatures?


0 to 1.5 Billion Guests: Airbnb’s Architectural Evolution

Airbnb operates in 200+ countries and has helped 4 million hosts welcome over 1.5 billion guests across the world.

What powers Airbnb technically?

Airbnb started as a monolithic application. It was built using Ruby-on-Rails and was internally known as the Monorail.

The monolith was a single-tier unit responsible for both client and server-side functionality.

However, as Airbnb went into hypergrowth, the Monorail started facing issues. This is when they began a migration journey to move from monolithic to Service-Oriented Architecture.

For Airbnb, SOA is a network of loosely coupled services where clients make their requests to a gateway and the gateway routes these requests to multiple services and databases.

Various types of services were built such as:

    Data Service: This is the bottom layer and acts as the entry point for all read and write operations on the data entities.

    Derived Data Service: These services read from data services and apply basic business logic.

    Middle Tier Service: They manage important business logic that doesn’t fit at the data service level or derived data service level.

    Presentation Service: They aggregate data from all other services and also apply some frontend-specific business logic.

After the migration, the Monorail was eliminated and all reads/writes were migrated to the new services.

Reference: Airbnb at Scale: From Monolith to Microservices


SPONSOR US

Get your product in front of more than 1,000,000 tech professionals.

Our newsletter puts your products and services directly in front of an audience that matters - hundreds of thousands of engineering leaders and senior engineers - who have influence over significant tech decisions and big purchases.

Space Fills Up Fast - Reserve Today

Ad spots typically sell out about 4 weeks in advance. To ensure your ad reaches this influential audience, reserve your space now by emailing sponsorship@bytebytego.com.

Fish AI Reader

Fish AI Reader

AI辅助创作,多种专业模板,深度分析,高质量内容生成。从观点提取到深度思考,FishAI为您提供全方位的创作支持。新版本引入自定义参数,让您的创作更加个性化和精准。

FishAI

FishAI

鱼阅,AI 时代的下一个智能信息助手,助你摆脱信息焦虑

联系邮箱 441953276@qq.com

相关标签

Rust Docker JWT 数字签名 Airbnb架构
相关文章