|
|
|
|
|
by Kenji
3582 days ago
|
|
Uh, stupid question but how do you cache a website like for example this comment thread on hackernews? Suppose a DDoSer calls this comment thread a lot of times. The request has to go through to the server because when I hit F5 or post a comment myself, I see the comments in realtime. How do you handle that exactly? Does caching for a few seconds help already, or does the backbone push updated sites to the CDN server? I have no experience in DDos mitigation. |
|
None of my guests have noticed this, and it has increased most of my analytics numbers as my pages are faster too.
The signed-in users, they get the dynamic pages.
But now the cookie that identifies the user is what you use to correlate any attack traffic, the attacker is forced to (somewhat) identify themselves and you can then revoke their authentication status or ban the account.
Finally you captcha and/or rate-limit the login page.
This is effectively what I do on my sites, the pages themselves and the underlying API all cache if the cookie or access token is absent.
This is trivial to do within the code, but can be harder to do with the CDN/security layer (who need to support a "vary on cookie" or "bypass cache on cookie" or equivalent).