TCP port check vs. full HTTP check — when does a port check suffice?
Q: For my mail server, should I check the port or do something heavier?
A: For non-web services — SMTP, databases, SSH, custom TCP daemons — a port check is often exactly right. It opens a connection to the port and confirms something's listening. Lightweight, fast, and there may be no HTTP layer to check anyway.
For websites, a port check is too shallow. Port 443 can accept connections while the app behind it is broken; you'd see green during a real outage. There a port check only tells you the listener is up, not that it's serving valid responses.
Upgrade the port check by validating the protocol banner where you can — e.g. expect the SMTP "220" greeting, not just an open socket. A listening port that returns garbage is still down for your users, and the banner catches it.
Got a question? Drop it in the comments.
Pingback Clinic
@PingbackClinic
TCP port check vs. full HTTP check — when does a port check suffice?
Этот пост опубликован в Telegram-канале Pingback Clinic. Подписаться можно по ссылке: @PingbackClinic.