lyfsy

two A record as HA?

Jan 23rd, 2020
1,859
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.31 KB | None | 0 0
  1. two A record as HA ?
  2. for mx records,i can set the priority as 10,20,..etc,
  3. ++++++++++++++
  4. list of top cheapest host http://Listfreetop.pw
  5.  
  6. Top 200 best traffic exchange sites http://Listfreetop.pw
  7.  
  8. free link exchange sites list http://Listfreetop.pw
  9. list of top ptc sites
  10. list of top ptp sites
  11. Listfreetop.pw
  12. Listfreetop.pw
  13. +++++++++++++++
  14. when mx1 fail,
  15. the mails will be sent to mx2.
  16.  
  17. but i have a question,
  18. if i have a domain and i set two a record ip for it,
  19. both 1.1.1.1 and 2.2.2.2,
  20. when certain one server(1.1.1.1) fail,
  21. will visitors be redirect to another server(2.2.2.2) directly ?
  22. Depends on the user agent . That is most modern browsers like Chrome, Firefox etc try the next IP after a configurable timeout setting in the browser.
  23.  
  24. But user agents like curl or wget may not do that.
  25.  
  26. This can be used to setup an easy HA solution or sometimes called poor mans HA as most normal users would be using a full blown web browser and they wont see the downtime
  27. for mx records,i can set the priority as 10,20,..etc,
  28. when mx1 fail,
  29. the mails will be sent to mx2.
  30.  
  31. but i have a question,
  32. if i have a domain and i set two a record ip for it,
  33. both 1.1.1.1 and 2.2.2.2,
  34. when certain one server(1.1.1.1) fail,
  35. will visitors be redirect to another server(2.2.2.2) directly ?
  36. Yes,
  37. but if you use IP based licensing, such as whmcs, when the browser loads from 2.2.2.2 you will get a license error.
  38. All browsers will work fine with this setup and try the other a record if the first fails, it is called round robin dns balancing. It works fantastic as longs as you do not have api endpoints
  39.  
  40. w hosting service
  41. domaine d'auriac
  42. hosting my own website
  43. host us
  44. rombolink.pw
  45. make money i earn cash app
  46. like-ads.com
  47. sub 6 hosting
  48.  
  49. If you have dynamic content e.g. user uploads you should put 'em in a cdn like bunnycdn, amazon s3, scaleway storage, digital ocean storage etc... If you have database content, the db server should have some HA setup (amazon serverless db, scaleway dbaas, digital ocean managed dbs, mongo atlas etc.)...
  50. Black Friday and Cyber Monday 2019 Deals - Curated List by Antonis @ FuzzFree - enjoy!
  51. Just note that timeouts control when it tries another IP and so page load times will be effected. If the downed IP is truly down and not just slow, then it should move on quickly. This is very basic load balance / HA setup . Using cloudflare or another proxy service that will automatically switch to another origin server would be better.
  52. for mx records,i can set the priority as 10,20,..etc,
  53. when mx1 fail,
  54. the mails will be sent to mx2.
  55.  
  56. but i have a question,
  57. if i have a domain and i set two a record ip for it,
  58. both 1.1.1.1 and 2.2.2.2,
  59. when certain one server(1.1.1.1) fail,
  60. will visitors be redirect to another server(2.2.2.2) directly ?
  61. Usually, yes.
  62.  
  63. Round robin dns (two A records pointing to different servers) isn't perfect, but, when one server is unreachable, most web browsers will try the other IP after a short delay.
  64.  
  65. You can expect, after a failure, something like 90% of the visitors previousoy using the failed server, will automatically move to the working server.
  66.  
  67. When both servers are working, it will load balance between the two. Not perfectly, but pretty close, 60/40 or 55/45 kind of balancing due to random factors.
  68. You can expect, after a failure, something like 90% of the visitors previousoy using the failed server, will automatically move to the working server.
  69. instead of loosing the 10% of traffic better yet just get a dns fail-over DNS service or build your own
  70. Round robin DNS takes effect immediately. DNS updates do not. If your needs are modest, round robin dns by itself is the simplest to implement and works better than you'd expect.
  71.  
  72. In some cases, you might want to combine round robin dns with other methods. It doesn't have to be either/or.
  73.  
  74. I do agree with other posts here that cloudflare with multiple origin servers is a good way to go. There's no need for round robin dns in that case.
  75. IOFLOOD.com -- We Love Servers
  76. Phoenix, AZ Dedicated Servers
  77. 1Gbps and 10Gbps Unmetered Servers In Stock!
  78. but i have a question,
  79. if i have a domain and i set two a record ip for it,
  80. both 1.1.1.1 and 2.2.2.2,
  81. when certain one server(1.1.1.1) fail,
  82. will visitors be redirect to another server(2.2.2.2) directly ?
  83. 2 A records are used for load balancing web requests. If one of them fails, browser could fail first(if it chooses 1.1.1.1 first) and then try next IP.
  84.  
  85. If the IPs are in same subnet, you may look at heartbeat or keepalived to host a virtual IP. If ip1 goes down, vip will shift to ip2. You can also load balance vip requests to ip1 and ip2 with healthchecks.
  86. BountySite: Website Time Machine with Offsite Security Scanning
  87. Adding Value and Revenue to your Hosting
  88. Round robin DNS takes effect immediately. DNS updates do not. If your needs are modest, round robin dns by itself is the simplest to implement and works better than you'd expect.
  89.  
  90. In some cases, you might want to combine round robin dns with other methods. It doesn't have to be either/or.
  91.  
  92. I do agree with other posts here that cloudflare with multiple origin servers is a good way to go. There's no need for round robin dns in that case.
  93. Also a note DNS Round Robin usually does. Cloudflare announced Zero Downtime Failover DNS records recently that my help if you do have more than one origin server serving the same content (cluster) https://blog.cloudflare.com/new-tool...void-downtime/
  94.  
  95. Cloudflare Zero Downtime Failover DNS works with their newly announced standalone health checks as well as existing Load balanacers too
  96. Zero-Downtime Failover
  97. What’s better than getting notified about downtime? Never having downtime in the first place! With Zero-Downtime Failover, we can automatically retry requests to origin, even before Load Balancing kicks in.
  98.  
  99. How does it work? If a request to your origin fails, and Cloudflare has another record for your origin server, we’ll just try another origin within the same HTTP request. The alternate record could be either an A/AAAA record configured via Cloudflare DNS, or another origin server in the same Load Balancing pool.
  100.  
  101. Consider an website, example.com, that has web servers at two different IP addresses: 203.0.113.1 and 203.0.113.2. Before Zero-Downtime Failover, if 203.0.113.1 becomes unavailable, Cloudflare would attempt to connect, fail, and ultimately serve an error page to the user. With Zero-Downtime Failover, if 203.0.113.1 cannot be reached, then Cloudflare’s proxy will seamlessly attempt to connect to 203.0.113.2. If the second server can respond, then Cloudflare can avert serving an error to example.com’s user.
  102.  
  103. Since we rolled Zero-Downtime Failover a few weeks ago, we’ve prevented tens of millions of requests per day from failing!
  104.  
  105. Zero-Downtime Failover works in conjunction with Load Balancing, Standalone Health Checks, and Passive Origin Monitoring to keep your website running without a hitch
  106. I have a domain on CF which has 5+ origins in different geographic regions as part of cluster that is now using Cloudflare's DNS with Zero Downtime Failover for DNS A records.
  107. Last edited by eva2000; 12-17-2019 at 05:36 AM.
  108. CentminMod.com Nginx Installer (Nginx 1.17, PHP-FPM 5.4-5.6, 7.0-7.3 (7.4 ready), MariaDB 10 + optional ngx_pagespeed/lua) for CentOS
  109. Centmin Mod Latest Beta Nginx HTTP/2 HTTPS supports TLS 1.3 via OpenSSL 1.1.1 or BoringSSL
Advertisement
Add Comment
Please, Sign In to add comment