Spikdi
B20:33
B20:33
Last week I had to deploy a new feature to production.
Tuần trước tôi phải triển khai một tính năng mới lên môi trường production.
First, I pushed the code to staging to test it safely.
Đầu tiên, tôi đẩy code lên môi trường staging để kiểm thử an toàn.
When a bug slipped through, I used a feature flag to hide it from users.
Khi một lỗi lọt qua, tôi dùng feature flag để ẩn nó khỏi người dùng.
Then I prepared a hotfix — a quick patch for the urgent bug.
Sau đó tôi chuẩn bị một hotfix — một bản vá nhanh cho lỗi khẩn cấp.
I did a gradual rollout, releasing the fix to ten percent of users first.
Tôi thực hiện rollout dần dần, phát hành bản sửa cho mười phần trăm người dùng trước.
If things went wrong, I could always rollback to the previous version.
Nếu mọi thứ hỏng, tôi luôn có thể rollback về phiên bản trước đó.
Thankfully, the hotfix worked and I continued the rollout to everyone.
May mắn là hotfix hoạt động và tôi tiếp tục rollout cho mọi người.
Now I always test on staging and use feature flags for big changes.
Giờ tôi luôn kiểm thử trên staging và dùng feature flag cho thay đổi lớn.
Deploying feels less scary when you have a rollback plan ready.
Triển khai đỡ sợ hơn khi bạn có sẵn kế hoạch rollback.
These steps turned my stressful releases into smooth ones.
Những bước này biến những bản phát hành căng thẳng của tôi thành suôn sẻ.
LI
My first deployment was a mess, but now I get it.
by @linhdaily