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
Copy file name to clipboardExpand all lines: sites/upsun/src/add-services/mysql/_index.md
+9Lines changed: 9 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,6 +11,11 @@ Their infrastructure setup is nearly identical, though they differ in some featu
11
11
See the [MariaDB documentation](https://mariadb.org/documentation/)
12
12
or the Oracle [MySQL Server documentation](https://dev.mysql.com/doc/refman/en/) for more information.
13
13
14
+
{{% note theme="info" title="MariaDB note" %}}
15
+
The [example](#mariadb-example) provided later in this topic is specific to using only a **primary** MariaDB database. For details about using read-only replicas to improve performance of read-heavy applications, see the [MariaDB read-only replication](/add-services/mysql/mysql-readonly-replication.md) topic.
16
+
{{% /note %}}
17
+
18
+
14
19
## Supported versions
15
20
16
21
You can select the major and minor version.
@@ -307,6 +312,10 @@ With the above definition, the application container now has [access to the serv
307
312
308
313
### MariaDB example
309
314
315
+
{{% note theme="info" %}}
316
+
Use the steps and sample code below if your application will connect to a **primary** MariaDB database. For details about using read-only replicas to improve performance of read-heavy applications, see the [MariaDB read-only replication](/add-services/mysql/mysql-readonly-replication.md) topic.
Copy file name to clipboardExpand all lines: sites/upsun/src/add-services/mysql/mysql-readonly-replication.md
+15-9Lines changed: 15 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,26 +1,32 @@
1
1
---
2
-
title: "MariaDB/MySQL read-only replication"
3
-
sidebarTitle: "Read-only replication"
4
-
description: Configure and access read-only MariaDB/MySQL replicas to ease the load on a primary database.
2
+
title: "MariaDB read-only replication"
3
+
sidebarTitle: "MariaDB read-only replication"
4
+
description: Configure and access read-only MariaDB replicas to ease the load on a primary database.
5
5
---
6
6
7
-
You can improve the performance of read-heavy applications by defining read-only replicas of your MariaDB/MySQL database and then connecting your applications to those replicas.
7
+
You can improve the performance of read-heavy applications by defining read-only replicas of your MariaDB database and then connecting your applications to those replicas.
8
8
9
9
Examples of read-heavy applications include:
10
10
- Listing pages or dashboards
11
11
- Reporting or analytics jobs
12
12
- Background jobs that frequently query data
13
13
14
+
{{< note theme="info" title="Note" >}}
15
+
-**Replication is asynchronous**: Delays of a few milliseconds might occur between writes on the primary database and reads on the replica database.
16
+
-**Replicas are read-only**: This restriction ensures data consistency and integrity. Attempts to modify data will result in an SQL error.
17
+
{{< /note >}}
18
+
19
+
### Read-only vs. external replicas
20
+
Read-only replicas are used primarily to improve application performance by distributing database read requests from read-heavy applications.
21
+
14
22
Other common use cases for read-only replicas include:
15
23
- Cross-region backup: Replicating data to different geographical regions
16
24
- Data warehousing: Extracting data from production to analytics projects
17
25
18
-
**Note:** Read-only replicas are used primarily to improve application performance by distributing database read requests from read-heavy applications.
19
-
20
-
[External replicas](/add-services/mysql/mysql-replication.md) have different use cases, including disaster recovery.
26
+
[External replicas](/add-services/mysql/mysql-replication.md) reside on remote servers and have different use cases, including disaster recovery.
21
27
22
28
### Replica scope and sharing services {#replica-scope-sharing-services}
23
-
MariaDB/MySQL services (which provide access to databases and replicas) defined in a project can be accessed by the applications in that project only.
29
+
MariaDB services (which provide access to databases and replicas) defined in a project cannot be accessed by or shared with applications in other projects.
24
30
25
31
{{< note theme="info" title="Important" >}}
26
32
-**Replication is asynchronous**: Delays of a few milliseconds might occur between writes on the primary database and reads on the replica database.
@@ -32,7 +38,7 @@ MariaDB/MySQL services (which provide access to databases and replicas) defined
32
38
The following code fragment defines two MariaDB services: a primary and a replica. You can use this fragment as a template by copying it into your `services.yaml` or `application.yaml` file.
33
39
34
40
Be sure to:
35
-
- Replace `<VERSION>` with the [supported MariaDB/MySQL version](/add-services/mysql/_index.md#supported-versions) that you need. Use the same version number for the primary and replica services.
41
+
- Replace `<VERSION>` with the [supported MariaDB version](/add-services/mysql/_index.md#supported-versions) that you need. Use the same version number for the primary and replica services.
36
42
-**Important:** Use `replicator` as the endpoint name when you define the replica service. This is a special endpoint name that the replica service uses to connect to the database.
Copy file name to clipboardExpand all lines: sites/upsun/src/add-services/mysql/mysql-replication.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
---
2
-
title: "MariaDB/MySQL External Replication"
3
-
sidebarTitle: "MariaDB/MySQL Replication"
2
+
title: "MariaDB/MySQL external replication"
3
+
sidebarTitle: "External replication"
4
4
description: In rare cases, it may be useful to maintain a replica instance of your MySQL/MariaDB database outside of {{% vendor/name %}} on a remote server.
0 commit comments