F
F
Fet2015-09-23 16:02:09
MySQL
Fet, 2015-09-23 16:02:09

Working with remote MySQL database. Why slow data transfer?

Hello.
Application on laravel 5.
For confidentiality purposes, the base is separate (the owner of the server is one), the code and pictures are separate (the owner is the second).
Data volumes are tossing and turning large. When everything is in a heap on one server (xeon 4core, 16gb ram, ssd) - everything works.
When they set up a connection to the RDS AWS Amazon database, it barely crawls. Although the server is chosen powerful.
What is missing in this configuration?
UPD Instance with amazon database in Frankfurt, server in Vilnius. According to the code, the connection to the database is not closed. Laravel 5 eloquent does eager loading. Problems N + 1 should not be
On the server dedicated line for 1 gigabit. How can I find network delays or check tcp performance. ubuntu server 14.04

Answer the question

In order to leave comments, you need to log in

6 answer(s)
A
Anton B, 2015-09-23
@halenharper

If you have MySQL, there may be a DNS issue.
Try

[mysqld]
# Skip reverse DNS lookup of clients
skip-name-resolve

A
Alexey Ukolov, 2015-09-23
@alexey-m-ukolov

What is missing in this configuration?

Network delays?

P
Puma Thailand, 2015-09-23
@opium

you don’t have a server in the amazon, but you suddenly decided to put the base in the amazon stupid

A
Andrey, 2015-09-24
@andreyvlru

The simplest and most common in this situation is a long resolve through DNS; the
rest of the available information is hard to figure out.

T
throughtheether, 2015-09-23
@throughtheether

What is missing in this configuration?
Alternatively, poor tcp performance.

H
He11ion, 2015-09-23
@He11ion

The traditional answer is either transfer everything as close as possible (ideally 1 DC in general), or cache everything that you have to get from a remote database to the maximum, or raise a mirror on a local machine with low-critical data, reducing the amount transmitted over the network.
Well, or all at once.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question