Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


What's the acceptable ping for external mySQL Database ?
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

What's the acceptable ping for external mySQL Database ?

yokowasisyokowasis Member
edited November 2018 in Help

as of right now I am using Google App Engine. The problem is Google Cloud SQL is very expensive. So, I am offloading mysql server into digital ocean.

The reason I am using Google App Engine, is because they come with Free Load Balancer, and the Apps will be scalled up and down automatically. The nature of my apps is it will be used probably 5 times a month. So renting VPS for a full month seems overkill. Also, I don't know what the loads will be, so that's that. I will let App Engine do the load balancing and scaling.

My Question :
What's the acceptable ping between the google app engine and the DO Server ? The database will be used for login and submitting the form. So, there is not much query sent. Probably about 5 query, 10 tops per user.

The apps will handle about 1000 users.

Any though ?

Comments

  • TripleflixTripleflix Member
    edited November 2018

    where are these services located? cus that wil be important. if google apps is in the EU and u connect to a DO server in the states itll be stupid...

    Just remember that every ms extra will slow down your app. so ~0 ms is always best :)

  • Ideal ping from App Server to DB server should be less than 10ms. Something like 40ms can be used for low traffic apps. Anything beyond that will have noticeable performance issues.

  • As previous posters have noted, you have to pay attention to the physical distance and ping time between the servers.

    In my experience, you'll want to have ping times in the single digits to avoid trouble. Any small increase in the ping time will result in a very noticeable lag in all database operations. Also, you have to be aware that with a setup like this, any network issues (packet loss, intermittent traffic spikes, etc.) between your application and DB servers will have major effects on the application. And there's nothing you can do about that, as you are at the mercy of your providers.

    Always try to locate the two servers within the same datacenter, if at all possible.

  • @Tripleflix said:
    where are these services located? cus that wil be important. if google apps is in the EU and u connect to a DO server in the states itll be stupid...

    Just remember that every ms extra will slow down you app. so ~0 ms is always best :)

    My preference is Singapore. But since Google App Engine doesnt have singapore Location, so I choose Asia South

    According to https://cloud.google.com/appengine/docs/locations it is located on Mumbai.

    I choose Bangalore on Digital Ocean.

    The thing is I don't know the reliable way to measure ping between both machine. Since the the Google App engine itself has dynamic IP.

    Pinging the domain sometime result in <10 ms, sometimes 100 ms.

  • deankdeank Member, Troll

    No more than 25ms. Absolutely no more than that. Anything more than that, you will feel the lag.

  • depends on your application, out databases are connected to the app hosts via infiband because at more than 0,3 ms the connections would pile up in seconds till everything crash.
    We have xxk of querys per second so not a common setup in LET space i guess. So be aware that everything can go wrong very fast if you actually care about what you host and is not the normal idle and don't care stuff that most here have.

    Thanked by 1vimalware
  • TBH, it depends on just how shitty your product is written. If you're hitting SQL for what should be locally redis/memcache'd for every load, you've got bigger problems than a bit of latency.

  • I've run forums on external mysql server that is a continent away. It really comes to how unbearable the speed is before your users still leaving in droves.

  • You can do the maths as to how this may impact your app. I'm currently having issues with an app that makes ~200 database requests per page load, unfortunately each of these are synchronous meaning that I'll be waiting (200 x (ping + avg query time)) + app processing time, and boy do those milliseconds add up. If you are only making 5-10 requests per request a ping of 20 is okay, but 200+ you absolutely need a sub-second ping.

    Thanked by 1cirrus_cloud
  • @yokowasis said:

    @Tripleflix said:
    where are these services located? cus that wil be important. if google apps is in the EU and u connect to a DO server in the states itll be stupid...

    Just remember that every ms extra will slow down you app. so ~0 ms is always best :)

    My preference is Singapore. But since Google App Engine doesnt have singapore Location, so I choose Asia South

    According to https://cloud.google.com/appengine/docs/locations it is located on Mumbai.

    I choose Bangalore on Digital Ocean.

    The thing is I don't know the reliable way to measure ping between both machine. Since the the Google App engine itself has dynamic IP.

    Pinging the domain sometime result in <10 ms, sometimes 100 ms.

    Digitalocean has a Singapore location I thought, why not choose that?

  • @PrivacyInfinity said:

    @yokowasis said:

    @Tripleflix said:
    where are these services located? cus that wil be important. if google apps is in the EU and u connect to a DO server in the states itll be stupid...

    Just remember that every ms extra will slow down you app. so ~0 ms is always best :)

    My preference is Singapore. But since Google App Engine doesnt have singapore Location, so I choose Asia South

    According to https://cloud.google.com/appengine/docs/locations it is located on Mumbai.

    I choose Bangalore on Digital Ocean.

    The thing is I don't know the reliable way to measure ping between both machine. Since the the Google App engine itself has dynamic IP.

    Pinging the domain sometime result in <10 ms, sometimes 100 ms.

    Digitalocean has a Singapore location I thought, why not choose that?

    Google app engine doesn't.

  • @CyberMonday said:
    TBH, it depends on just how shitty your product is written. If you're hitting SQL for what should be locally redis/memcache'd for every load, you've got bigger problems than a bit of latency.

    I need the load balancing and the auto scaling feature of the Google App Engine. The content itself is cached and loaded through REST API (offloaded from another server) and currently not a problem nor a concern.

    The Google App Engine is there for back end / interface to MySQL for authentication (login) and form save / submission.

    So, obviously the MySQL is not used for every page load. It's used just for authentication and form submission.

  • deankdeank Member, Troll
    edited November 2018

    Then it's fine unless you are getting like 10,000ms.

    Even 100ms will be fine.

  • Make sure to encrypt that communication

  • What's the acceptable ping for external mySQL Database ?

    The latency what will not affect visually performance of your app.

  • NeoonNeoon Community Contributor, Veteran

    Depends how slow you want your website.
    If your database server is 100ms every, every query takes that 100ms + execution.

    I just would not do that, maybe if its in the same Rack or datacenter but thats sometimes even to high latency compared to local.

  • You might wanna look into Kubernetes. This is exactly why microservices exist. Move everything to DigitalOcean's k8s offering and you should be good.

    I've hosted a legacy app (WordPress) with an external database cluster. WordPress is really shit and my stack didn't help at all. FYI I was getting 18 ms on the external cluster and it was really slow and this was not acceptable because of my database size.

  • Across the Atlantic Ocean (100ms+) is definitely too slow.

  • @CyberMonday said:
    TBH, it depends on just how shitty your product is written. If you're hitting SQL for what should be locally redis/memcache'd for every load, you've got bigger problems than a bit of latency.

    This. Maybe modify your app so that latency isn't a problem anymore? Store results locally and update the database every x seconds for example?

  • For larger latency it makes more sense to have a stored procedure where you can query once or as minimally as possible... rather than liberally querying it when you feel like it.

  • If you need dynamic load balancing them you're expecting times of high load, enough that remote db accesses will probably kill you. You can do various hacks with local caching but you might prefer to move everything to DO and put effort instead into handling scaling there.

  • ramnetramnet Member, Host Rep

    The acceptable ping for an external mySQL database will greatly depend on your application.

    If the application is low traffic like you say, then you should be fine.

    The only way to know for sure is to try what you are planning and see if the performance is satisfactory for you.

  • Probably about 5 query, 10 tops per user.

    The apps will handle about 1000 users..

    1000user submit query at same time?

    why not put local server / near user

Sign In or Register to comment.