If you like DNray Forum, you can support it by - BTC: bc1qppjcl3c2cyjazy6lepmrv3fh6ke9mxs7zpfky0 , TRC20 and more...

 

Site on several hosting webservices

Started by chadha, Dec 13, 2022, 09:10 AM

Previous topic - Next topic

chadhaTopic starter

Greetings everyone, our online store is currently hosted on IHC hosting platform. However, we are aiming to broaden our reach by expanding our operations in China, South Korea, and potentially other countries.

To achieve this goal, we need to distribute our PHP site across multiple hosting sites. When a user accesses our website from China, for instance, they will be directed to a server located in China for faster loading times and improved user experience.

Despite this, we still need to come up with a centralized database of all these sites to ensure seamless management and monitoring. Your valuable inputs and insights would be greatly appreciated.

Thank you in advance for your responses.
  •  


np.carzspa

This situation is either dishonest or not straightforward. The reason why DNS doesn't function properly is because it is cached in a foolish way.

While using a CDN can offer some assistance, it only has a minor impact, especially since the core load on the store's website is from the engine itself rather than images.

In general, proxying is not a wise decision since it results in triple latency. Instead, consider creating several copies of the site and allowing users to choose which one they want to access based on GeoIP information.

If CDNs are available (even free ones like CloudFlare), you can use GeoDNS and nginx proxying to accomplish this yourself. The choice is ultimately yours.
  •  

john121

In my opinion, the most sensible approach would be to create domain names for both the first and second levels, as well as for locales such as /eu, /ch, and /fr. Each host should have a replica of the site and shared resources, such as pictures, styles, code base, and tables with users should be handled appropriately, using rsync or a similar tool, without unnecessary replication.

Regarding Geodyns, I don't believe it will be very helpful, even if your countries are different. However, it could be used in conjunction with other measures to redirect users to their "native" store.

CDN could also be utilized to distribute static content, which may prove useful considering the significant number of images you have. Additionally, if there is video content related to your goods, it can be distributed through CDN as well.

Another option to consider is implementing a geo-distributed database, which largely depends on the database engine being used. MySQL is not well-suited for A-A replication, but NoSQL databases can handle it.
  •  

orlandouriel

There are various ways to approach this task. One solution involves using multiple A-records on the domain where the online store is hosted. However, data replication is a challenging aspect that must be addressed.

Maintaining the current state of the site across multiple hosting sites is necessary but complicated. An reliable service provider should be selected, as qualified technical professionals will be required to achieve this task. This will result in significant costs associated with maintaining such a system.
  •  

anilkh7058

Site on several hosting services are
Hostinger, Blueshot, InMotion Hosting, SiteGround etc.
software development company
  •  

soniakumari

You're on the right track by thinking about distributing your PHP site across multiple hosting locations. When you're dealing with users from different countries, especially in regions like China and South Korea where internet regulations and speeds can be very different from the rest of the world, having servers close to the users is crucial for faster loading times.

Now, there's a few things you'll need to take into consideration:

Content Delivery Network (CDN): Before diving into full-on multi-region hosting, you might want to explore using a CDN, such as Cloudflare or Akamai. CDNs cache static assets (like images, CSS, JavaScript) at multiple points around the world, delivering them to users from the nearest location. This can reduce latency significantly, especially in regions like China where international bandwidth can be limited. However, a CDN won't solve everything if you have dynamic PHP content that needs to be processed on the server-side, which brings us to the next point.

Geographically Distributed Hosting: For dynamic content (like PHP), you'll need to actually host your website on servers located in China, South Korea, etc. You could use providers that have data centers in these regions—Alibaba Cloud for China, for example, or KT Cloud for South Korea. The key challenge is making sure users are directed to the nearest server based on their location. For this, you can set up Global DNS Load Balancing. Services like AWS Route 53, or Cloudflare's load balancing feature can help you automatically route users to the closest server.

Centralized Database Management: Here's where it gets a bit trickier. You'll want a centralized database that all your distributed servers can connect to, but the challenge is keeping the latency low for all regions. One approach is to use a Database Replication Strategy. For example, you can have a primary database hosted in a central location, and then set up read replicas in each region (China, South Korea, etc.). The challenge here is ensuring data consistency, especially if you have a high volume of writes to your database. You'll need to use a database solution that supports cross-region replication—MySQL with Galera Cluster, or a cloud-managed service like AWS Aurora Global Database.

Compliance and Legal Considerations: Expanding into China specifically introduces some unique challenges. China has strict regulations around data, and you may need to host data physically in China to comply with regulations like the China Cybersecurity Law. Make sure you're aware of these requirements and that your hosting provider in China is compliant.

Monitoring and Maintenance: When you're dealing with multiple hosting environments across different countries, monitoring becomes crucial. You should use a centralized monitoring system that can keep track of the health and performance of your servers in each region. Tools like New Relic, Datadog, or even AWS CloudWatch can provide you with insights into how each server is performing, and alert you to any issues.

Latency and Connectivity: Be prepared for challenges with latency and connectivity between your central database and remote servers, especially in China, where the Great Firewall can impact international connections. One strategy to mitigate this is to have a database sharding setup where each region has its own database instance that syncs periodically with the main central database.

To summarize, here's the steps to get started:

Implement a CDN for static content.
Set up geographically distributed hosting for your dynamic PHP content.
Use global DNS load balancing to route users to the nearest server.
Implement a centralized database management solution with replication for read performance.
Ensure legal compliance, especially in China.
Set up centralized monitoring to manage your entire infrastructure.
This approach will give you the performance benefits of local hosting while maintaining centralized control over your data and website management.
  •  


If you like DNray forum, you can support it by - BTC: bc1qppjcl3c2cyjazy6lepmrv3fh6ke9mxs7zpfky0 , TRC20 and more...