关于 Frank

软件工程师,擅长面向搜索引擎编程。在美工组。

RSS 地址: https://nyan.im/feed

请复制 RSS 到你的阅读器,或快速订阅到 :

Frank RSS 预览

房车旅行:观看星舰发射

2024-06-03 14:00:00

本文记录了2024年三月作者观看星舰第三次发射的经历。为了观看发射,他早早预定了KOA房车营地和拖挂房车。出发时遇到电路问题,途中经历了长途驾驶并在挤满游客的South Padre Island等待发射,尽管天气不佳,但整体体验良好。

The post 房车旅行:观看星舰发射 appeared first on Frank's Weblog.

电子邮件防伪:SPF, DKIM与DMARC

2024-02-18 07:59:14

本文探讨了电子邮件伪造问题,介绍了解决方案SPF、DKIM和DMARC。文章通过实例和技术细节解释了这些防范电子邮件伪造的标准和技术。

The post 电子邮件防伪:SPF, DKIM与DMARC appeared first on Frank's Weblog.

Anti Email Spoofing: SPF, DKIM and DMARC

2024-02-18 07:58:34

This post explains email spoofing, detailing DMARC, SPF, and DKIM protocols that help verify authorized sending servers and authenticate emails to prevent fraudulent activities.

The post Anti Email Spoofing: SPF, DKIM and DMARC appeared first on Frank's Weblog.

Project Miata – 软顶更换及内饰修复

2024-02-17 07:59:00

作者详细记录了对一台Miata进行软顶更换和内饰恢复的过程。工作包括更换破损的软顶,清洗座椅和地毯,修复生锈的座椅底盘和车体其他部分。作者遇到了许多挑战,如座椅金属部分的严重生锈和断裂的螺栓,但通过创造性的解决方案,成功恢复了车辆的内饰,使其焕然一新。

The post Project Miata – 软顶更换及内饰修复 appeared first on Frank's Weblog.

Project Miata – Soft Top Replacement & Interior Restoration

2024-02-17 07:58:00

The author restored the interior of a Miata, initially aimed at cleaning and replacing the soft top, revealed extensive rust. This led to extra work, including seat pan restoration, carpet treatment, and trunk maintenance, showcasing the unpredictable yet rewarding journey of vintage car restoration.

The post Project Miata – Soft Top Replacement & Interior Restoration appeared first on Frank's Weblog.

2023年终总结

2024-01-01 07:59:00

最初,没有人在意,这不过是一次hire freeze,一场裁员,一家公司的解散,一间银行的倒闭,直到这场危机与每个人息息相关。

The post 2023年终总结 appeared first on Frank's Weblog.

Project Miata – Shifter Rebuild

2023-12-11 08:30:00

The author encountered a stiff shifter in his Miata and realized it required maintenance. He purchased a shifter rebuild kit and carried out a self-service, replacing rubber, bushings, and old fluids, and meticulously reassembled the shifter. The issue got resolved improving the vehicle's gear shifting performance.

The post Project Miata – Shifter Rebuild appeared first on Frank's Weblog.

Project Miata – 换挡杆维护

2023-12-11 08:29:00

这篇文章描述了作者对他的Miata换挡杆进行维护的经历。他发现换挡不顺畅,换挡把活动量大。为此,他购买了换挡杆重建套件和必要工具,如75W-90齿轮油和注射器。维护中发现换挡杆损坏严重,原厂垫圈碎裂。他更换了损坏的零件,重新组装,注入新齿轮油。使换挡体验焕然一新

The post Project Miata – 换挡杆维护 appeared first on Frank's Weblog.

Project Miata – $2000 Project Car

2023-11-11 09:16:00

The author purchased a 1995 Miata with various minor damages as a project car from Craigslist. Despite issues like a damaged fender, broken rear plastic window, and non-functioning odometer and gas gauge, the car was deemed a perfect fixer-upper due to the car's inexpensive cost and straightforward repairs. A test drive uncovered no significant problems. The author completed the purchase for $2000, intending to restore the car for daily use and occasional motorsport. This marks the start of the 'Project Miata'.

The post Project Miata – $2000 Project Car appeared first on Frank's Weblog.

Project Miata – $2000玩具车

2023-11-11 09:15:00

作者在Craigslist上购得了一辆1995年的Miata,虽然车辆存在一些问题,如受损的车翼板、破裂的后部塑料窗户、以及不工作的里程表和油表等,但由于这些问题相对较小,而且车辆价格适中,易于修复,因此被视为理想的翻新项目。最终,作者以2000美元的价格完成了交易,计划对车辆进行修复,使其适用于日常驾驶和偶尔的汽车运动。这标志着“Project Miata”正式启动。

The post Project Miata – $2000玩具车 appeared first on Frank's Weblog.

教科书级别的云服务构建指南——「在一年内从零开始构建ClickHouse Cloud」一文的翻译与笔记

2023-11-04 10:15:00

ClickHouse团队这篇文章自今年3月发布以来,就看到Twitter上有很多人转发或推荐了这篇文章。

这是一篇教科书级别的文章,讲述如何基于Kubernetes构建一个Serverless云服务。因为我从事的领域和这方面相关,并且我所参与的产品开发与这篇文章有很多相关之处。我研读了这篇文章很多很多遍,然后决定将这篇文章翻译并添加我的理解。

你有好奇过在一年内开发一个无服务器(Serverless)的SaaS服务都需要些什么吗?在这篇博文中,我们将介绍我们如何从零开始构建ClickHouse Cloud ——一个基于全世界最流行的OLAP(online analytical processing)数据库之一构建的托管服务。我们深入研究了我们的规划流程、设计和架构决策、安全性和合规性考虑因素,如何在云上实现全球可扩展性和可靠性,以及我们在此过程中学到的一些经验教训。

The post 教科书级别的云服务构建指南——「在一年内从零开始构建ClickHouse Cloud」一文的翻译与笔记 appeared first on Frank's Weblog.

My First Autocross at Subiefest Texas

2023-09-23 07:30:00

This year, Subiefest, the Subaru’s official car meet, came to Texas for the first time. In addition to exhibitions and vendors, there are also car shows and Autocross.

If you are not familiar with Autocross:

Autocross, or “parking lot racing” as my brother likes to call it, is a low-cost, low-struggle, low-risk way to get out and drive your car fast. Typically set up in a parking lot, airport, track, or any place with a wide open piece of tarmac, the “race track” is an improvised course marked with small traffic cones. Cars run one at a time in an effort to score the best time through the course. Hitting cones results in penalty time added to your run, usually a second or two. Most runs are anywhere from 40-100 seconds long.

Usually any car that drives and satisfies the requirements on the tech inspection list can attend. One common exception is SUVs and pickup trucks are excluded in most autocross events because of higher rollover risk.

When I bought the tickets for the Subiefest event, the Autocross registrations were already sold out. At Friday night before the event, I noticed Subiefest instagram said there were a few extra Autocross spots available and luckily I got one of the last a few spots.

However that means as a newbie with no real world experience, I have only one day to prepare

The post My First Autocross at Subiefest Texas appeared first on Frank's Weblog.

在Subiefest Texas的首次Autocross

2023-09-23 07:25:00

今年斯巴鲁官方车聚Subiefest第一次来到了德州。除了展览和Vendor之外,还有Car show和Autocross。

如果你不了解什么是Autocross:

Autocross是一种低门槛,低强度且安全的赛车运动,目的是让车手了解自己的极限和汽车的极限。场地通常是在废弃机场,大型停车场等开阔空间用锥筒摆出的赛道。赛道上通常只有一辆车,通过计时与其他选手竞争。

总之可以理解为“停车场赛车”。参与Autocross的门槛很低,通常任何能开且满足Tech inspection要求的车辆都可以参与。一个常见的例外是大部分的Autocross活动都禁止SUV和皮卡参与,因为较高的重心会带来更高的翻车风险。

当我买票的时候,Autocross的名额已经没有了。就在活动前的周五晚上,我在主办方的Instagram上看到又有Autocross名额放出,然后非常幸运的抢到了为数不多的几个名额之一。

然而这意味着作为没有真实世界经验的新手,我只有周六一天时间去完成准备工作。

The post 在Subiefest Texas的首次Autocross appeared first on Frank's Weblog.

博客10周年纪念

2023-09-05 11:00:00

从2013年起计算,今年是我写博客的第10年,这大约是我持续时间最长的业余项目。

最初创建博客的机遇是高中的时候,我和几个朋友一起创建了一个科技社团,我们想给社团做一个网站。我们当时只是觉得拥有一个网站很酷,实际上并没有想好网站要用来做什么内容。如果你翻到最后一页,你仍然可以找到朋友们当时写的文章。

就像中学时折腾过的各种项目一样,过了一段时间过后慢慢就荒废了。并且SAE花费确实有些高昂,于是我又把网站捡起来,并搬到了国外的VPS上,后来就成为了我的个人博客。

内容方面,一开始我的文章以技术类教程为主,当时对于技术的涉猎还不太广泛,主要围绕博客搭建(每个博主绕不开的话题LOL),Linux,树莓派,Arduino等等。

随着时间的推移,和技术的理解和应用逐渐深入,我开始尝试写一些更深入的技术内容,记录生活中的事件,以及一些对于冷门问题的分析和解决方案。

The post 博客10周年纪念 appeared first on Frank's Weblog.

A PoC for Geographically Distributed WordPress Deployment

2023-08-25 04:00:00

This site is hosted in a single AWS Lightsail instance in Japan West region, it has perfect performance when visiting from near by regions, however it has poor performance if visiting from another continent.

- Poor TTFB and LCP from US East and Europe
- Core Web Vital fails because of slow LCP, which impacts SEO performance.

I've been using WordPress to run this site for almost 10 years. WordPress have been a very successful software in blogging, CMS and even e-commerce. Comparing with static solutions, it takes more effort to optimize its performance, because of its "dynamic" nature.

I've done a lot of performance tuning for this site, and it already archived ~150 ms TTFB from nearby cities, it's not possible to optimize any further from the server side. It's also very difficult to optimize the time that data travels between visitors and the server, since the speed of the packet is limited by the speed of light, and we don't have the control to the routing of the packets.

One solution that came up to my mind is to add more origin servers and make them distributed all over the world. The visitors will hit the nearest server to eliminate the latency, it also makes the site HA by rerouting the visitors to the working site in case one of the servers is down. While there are some managed WordPress hostings that provide this feature, but these services are very expensive.

I decided to conduct a proof of concept for this idea. The goals are:

- <500 ms TTFB globally - Highly available - Scalable - Budget friendly This article will cover the design and implementation of a geographically distributed WordPress architecture, and review the design based on its performance, cost, maintainability and scalability.

The post A PoC for Geographically Distributed WordPress Deployment appeared first on Frank's Weblog.

UHaul Trailer Lighting Issue During Cross Country Move

2023-06-12 09:45:00

We recently embarked on a cross-country move from Syracuse to Dallas, towing a U-Haul 5x8 trailer behind our car. The trip was split into four days, with stops in Mansfield, OH, Nashville, TN, and Little Rock, AR.

Before leaving Syracuse, I checked every item according to the checklist, including hitch pin, ball mount, coupler, safety chain, wiring, tires, lock, etc. However, I skipped checking the lights because they were already tested when picking up the trailer, so I assumed that they should be working properly as long as the connection was good.

The first stop was Mansfield OH, about 7 hours drive from Syracuse. We stopped for dinner and gas at a small town near Cleveland OH. It was almost dark and I was a bit anxious since I skipped the light check before departure. So I checked the trailer tail lights and found out that the lights were off.

The post UHaul Trailer Lighting Issue During Cross Country Move appeared first on Frank's Weblog.

跨州搬家途中的UHaul拖车尾灯短路问题

2023-06-11 08:45:00

5月底,我们从雪城搬到了达拉斯。我们选择了开自己的车,后面拖UHaul的5x8拖车。整个行程分为4天,途径Mansfield OH,Nashville TN和Little Rock AR。

从雪城出发前,我按照事先列好的检查单检查了每一个项目,包括拖车的连接(pin, ball mount, coupler, safety chain,wiring),轮胎,锁,两只猫的牵引绳,AirTag,重要的行李等等。然而我唯独跳过了对灯光的检查,因为在取车时已经测试过车灯,所以我认为只要插头插好,车灯应该是正常工作的。

第一天的终点是Mansfield OH,离雪城大约7小时车程。在路过Cleveland OH附近的一个小镇时我们停下来买晚饭和加油。当时天已经快黑了,因为中午出发时跳过了灯光的检查,总是有些不放心。于是我去检查了拖车尾灯,结果发现灯不亮了。

The post 跨州搬家途中的UHaul拖车尾灯短路问题 appeared first on Frank's Weblog.

Use Cloudflare Load Balancer with Cloudflare Tunnel

2023-02-24 08:35:00

Cloudflare Load Balancer is a global load balancing product provided by Cloudflare. It can connect to origin servers in traditional ways by DNS name or IP addresses, it also can be integrated with Cloudflare Tunnel to create a seamless and secure network infrastructure.

Using Cloudflare Tunnel with Cloudflare Load Balancer is more complicated as we need to configure the DNS name and host header to make sure the routing and monitoring work correctly.

In this post, we will use an example to demonstrate how to use Cloudflare Load Balancer with Cloudflare Tunnel.

The post Use Cloudflare Load Balancer with Cloudflare Tunnel appeared first on Frank's Weblog.

配合Cloudflare Tunnel使用Cloudflare Load Balancer

2023-02-24 08:30:00

Cloudflare Load Balancer是Cloudflare提供的一个全球负载均衡产品。它可以以传统方式(域名或IP地址)连接源服务器,还可以与Cloudflare Tunnel集成,以创建一个无缝和安全的网络基础设施。

将Cloudflare Tunnel与Cloudflare Load Balancer一起使用的配置与传统方式相比略微复杂,我们需要正确地配置域名和Host头,以确保路由和监控的正常工作。

在这篇文章中,我们将用一个例子来演示如何配置将Cloudflare Load Balancer与Cloudflare Tunnel一起使用。

The post 配合Cloudflare Tunnel使用Cloudflare Load Balancer appeared first on Frank's Weblog.

Post Mortem for Blog Outage on 2023/1/21

2023-02-09 09:10:00

On 1/21/2023, my blog was attacked and went down for 4 hours. This article will cover what the incident was like, the root cause analysis and improvements.

On that day, I woke up in the noon and saw the alert email from UptimeRobot. Sometimes a network or server glitch can trigger an alert as well, but it have been 2 hours since alert triggered, so apparently that's not the case. I found I was not able to connect to the website, while sometimes I could connect but got 504.

I ssh-ed to the server and restarted all the Docker containers, but the problem persists. top showed that all the load average were 6.xx and most of the CPU usage were from php-fpm. I checked the graphs in nginx amplify and found that nginx have received large amount of requests during past few hours.

I planned to go grocery shopping for the lunar new year dinner with my girlfriend, so I didn't want to spend too much time on this. I simply turned on the Cloudflare reverse proxy(orange cloud icon) and "Under attack" mode and left home.

After a while I received the alert clear email from UptimeRobot and website was back online.

Over last few years I've implemented a set of monitoring and security measures for my site and automated scripts to mitigate common issues.

1.UptimeRobot for monitoring downtime. I’ll receive alerts if the website cannot be reached or returned HTTP status that indicates a malfunctioning(5xx).

2.nginx amplify for monitoring nginx and OS metrics. I’ll receive alerts if some metrics(eg. disk usage, requests per second) goes over the threshold.

3.If requests per second goes over the threshold, it will automatically turn on Cloudflare proxy and increase security level.

4.WordPress security plugin automatically blocks malicious requests.

Benefit from these measures, my site have maintained a uptime of nearly 100%. Being a blog that only have 2 digits of visitors everyday, 4 hour downtime is nothing to worry about. But my professional habit have been wondering what happened behind the incident, especially why these measures failed to prevent the incident from happening.

The post Post Mortem for Blog Outage on 2023/1/21 appeared first on Frank's Weblog.

2023/1/21博客受攻击宕机事件分析与复盘

2023-01-31 05:00:00

2023年1月21日,我的博客收到攻击宕机了4个小时左右。本文将介绍事件的经过,对根本原因的分析,及改进方案。

当天中午,我起床之后看到了UptimeRobot的报警邮件。有时一些网络或者服务器的短暂故障也会触发报警,但是当时距离收到报警邮件已经过去了近两个小时,所以事情显然没有这么简单。我简单检查后发现访问博客时有时完全无法连接,有时会返回504。

我ssh上去之后重启了一下所有Docker容器,但是故障依旧。top显示全部load average高达6.xx并且大部分的CPU使用来自php-fpm。检查nginx amplify图表之后发现过去几小时内nginx收到了大量的请求。

因为当天下午我计划和女朋友去采购年夜饭的食材,不想在这上面花费太多时间,于是我打开了Cloudflare的反向代理(橙色云图标)和Under attack模式,然后就出门了。

过了一段时间后就收到UptimeRobot的报警解除邮件,访问恢复。

我的博客上有一套监控和安全措施,以及一些自动化脚本来mitigate一些简单问题:

- UptimeRobot用于监控可访问性,如果出现无法连接或异常的HTTP状态(5xx)则会发邮件报警
- nginx amplify用于监控nginx和操作系统的指标,其中一些指标(例如磁盘使用,每秒请求数量)超过阈值之后会发邮件报警。
- 如果每秒请求量超过阈值则会自动开启Cloudflare反向代理并升高安全等级。
- WordPress的安全插件会自动block恶意请求。

受益于这些措施,博客在过去几年一直保持着近乎100%的uptime。作为一个每日访问量两位数的博客,4个小时的downtime并不是一个需要担心的问题,但是职业习惯还是让我想知道背后到底发生了什么,尤其是为什么这一系列措施都未能阻止宕机的发生

The post 2023/1/21博客受攻击宕机事件分析与复盘 appeared first on Frank's Weblog.

Deploying Budget Friendly ARM-X86 Hybrid Kubernetes Cluster with K3s

2023-01-16 05:00:00

中文版:使用K3s部署预算友好的ARM-X86混合Kubernetes集群 – Frank’s Weblog Kubernetes were used for enterprise level services, which is heavy and expensive. Even for the least-expensive Digital Ocean, its managed Kubernetes starts with $12/month per node. Then I learned about K3s, a lightweight Kubernetes distribution that removes or lightens many of the components in Kubernetes, allowing K3s to run on smaller […]

The post Deploying Budget Friendly ARM-X86 Hybrid Kubernetes Cluster with K3s appeared first on Frank's Weblog.

Create Personal Financial Sankey Diagram from Intuit Mint Data

2023-01-07 11:32:06

Throughout 2022, the financial statements from tech companies were extensively discussed, and you probably have seen diagrams like this: I later discovered that this diagram is known as Sankey Diagram, which is a type of flow diagram in which the width of the arrows is proportional to the flow rate of the depicted extensive property. […]

The post Create Personal Financial Sankey Diagram from Intuit Mint Data appeared first on Frank's Weblog.

2022 Year in Review

2023-01-01 02:00:00

2022 was a somehow a bumpy ride. Although many goals were not achieved, it was fortunate that I did not encounter any major difficulties in such a tough environment.

The post 2022 Year in Review appeared first on Frank's Weblog.

2022年终总结

2023-01-01 01:59:00

2022年从某种程度上是乏善可陈的一年。虽然很多目标并没有达成,但在糟糕的大环境下也万幸没有遇到什么大的困难。

The post 2022年终总结 appeared first on Frank's Weblog.