You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Fixed json with slash (#48)
- Fixed disabling events that are needed (#46)
- Changed to @inherit phpdoc in jsonSerialize methods
- Removed unused exceptions from phpdoc
- Changed moved wiki do readme
- Changed added missing php extensions to composer.json
- escape using json rpc specification
Copy file name to clipboardExpand all lines: README.md
+18
Original file line number
Diff line number
Diff line change
@@ -365,3 +365,21 @@ php example/benchmark.php
365
365
8058 event by seconds (11000 total)
366
366
8071 event by seconds (12000 total)
367
367
368
+
FAQ
369
+
=========
370
+
371
+
1.### Why and when need php-mysql-replication ?
372
+
Well first of all mysql don't give you async calls. You usually need to program this in your application (by event dispaching and adding to some queue system and if your db have many point of entry like web, backend other microservices its not always cheap to add processing to all of them. But using mysql replication protocol you can lisen on write events and process then asynchronously (best combo it's to add item to some queue system like rabbitmq, redis or kafka).
373
+
374
+
2.### It's awsome ! but what is the catch ?
375
+
Well first of all you need to know that a lot of events may come through, like if you update 1 000 000 records in table "bar" and you need this one insert from your table "foo" Then all must be processed by script and you need to wait for your data. This is normal and this how it's work. You can speed up using [config options](https://github.com/krowinski/php-mysql-replication#configuration).
376
+
Also if script crashes you need to save from time to time position form binlog (or gtid) to start from this position when you run this script again to avoid duplicates.
377
+
378
+
3.### I need to process 1 000 000 records and its taking forever!!
379
+
Like I mention in 1 point use queue system like rabbitmq, redis or kafka, they will give you ability to process data in multiple scripts.
380
+
381
+
4.### I have a problem ? you script is missing something ! I have found a bug !
382
+
Create an [issue](https://github.com/krowinski/php-mysql-replication/issues) I will try to workon it in my free time :)
383
+
384
+
5.### How much its give overhead to mysql server ?
385
+
It work like any other mysql in slave mode and its giving same overhead.
0 commit comments