Skip to content

Commit a74c8c8

Browse files
committed
vault backup: 2025-07-22 21:00:34
1 parent 160f958 commit a74c8c8

21 files changed

Lines changed: 280 additions & 106 deletions
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
tags:
3+
type:
4+
date: 2025-07-22
5+
done: false
6+
---
7+
# cloudwatch
8+
- RDS console -> aurora -> modify -> log exports -> publish to cloudwatch
9+
- aurora serverless v1 automatically uploads all logs if you enabled a log_type
10+
```
11+
/aws/rds/cluster/cluster-name/log_type
12+
```
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
tags:
3+
type:
4+
date: 2025-07-22
5+
done: false
6+
---
7+
> Delete logs on rotation to save storage and avoid performance issues due to large log files
8+
- 15% of the size of DB instance is only allowed for the log files
9+
- Log rotation are done every hour
10+
- Logs older than 30 days are deleted or the oldest log file
11+
- audit, general and slow query logs are deleted 24 hours / threshold exceeded
12+
- if `log_output` is set to `TABLE`, then the table is truncated

aws/database/aurora - log types.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
tags:
3+
type:
4+
date: 2025-07-22
5+
done: false
6+
---
7+
# Types of logs
8+
## Error log (Generated by default)
9+
10+
## Slow query log (need to specify in db parameter groups)
11+
- `slow_query_log` 1 or 0 - enables slow query log
12+
- `general_log` 1 or 0 - enabled general log
13+
- `log_output` to Table (mysql.general_log) or file
14+
- `long_query_time` specify the threshold, fast queries are identified based on this
15+
> To send the logs to cloudwatch, use the agent and push the file in file system
16+
## General log (need to specify in db parameter groups)
17+
## Audit log (Advanced auditing) [1](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/AuroraMySQL.Auditing.html#AuroraMySQL.Auditing.Enable.server_audit_incl_users)
18+
- `server_audit_logging` - enable or disable Advanced Auditing
19+
- `server_audit_events` - what events to log
20+
- `server_audit_incl_users` - include users
21+
- `server_audit_excl_users` - exclude users
22+
- The audit logs can be downloaded from the console
23+
## Instance log
24+
-
25+
## IAM database authentication error log
26+
# References
27+
1. [Using Advanced Auditing with an Amazon Aurora MySQL DB cluster](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/AuroraMySQL.Auditing.html#AuroraMySQL.Auditing.Enable.server_audit_incl_users)
28+
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
tags:
3+
type:
4+
date: 2025-07-22
5+
done: false
6+
---
7+
- rds bg setup creates a new staging environment copies from prod
8+
- blue - prod
9+
- green - staging
10+
- You can do your testing in green and switchover environments.
11+
- All the replicas, configurations, monitoring
12+

aws/database/rds - multi az.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
tags:
3+
type:
4+
date: 2025-07-22
5+
done: false
6+
---
7+
- For Disaster recovery only
8+
- **SYNC** replication to a standby instance
9+
- Automatic failover
10+
- Increases availability
11+
- No Manual intervention required
12+
Multi AZ reduces downtimes caused by version upgrades, backup snapshots.
13+
# Failover Conditions in Multi-AZ
14+
- Primary DB is failed
15+
- Primary DB is in software patching
16+
- Unreachable due to loss of Network Connectivity (AZ)
17+
- Changing the instance type
18+
- Busy and Unresponsive
19+
- Underlying storage failure
20+
- Az outage
21+
- Manual Failover (reboot with failover)
22+
# How to go from Single AZ to Multi AZ
23+
- Zero Downtime operation
24+
- Can be done on console
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
tags:
3+
type:
4+
date: 2025-07-22
5+
done: false
6+
---
7+
# rds events and logs
8+
- RDS delivers it events to **eventbridge** and SNS topics can be setup
9+
- RDS logs can be sent to **cloudwatch**, then metric filter, then alarm, then SNS, then Admin
10+
# monitoring w cloudwatch
11+
From Hypervisor
12+
- Basic metrics
13+
From an agent (Enabled Enhanced Monitoring)
14+
- Lot of metrics
15+
# rds performance insights
16+
- Tools to monitor RDS performance, bottlenecks and analyse performances in user or query levels
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
tags:
3+
type:
4+
date: 2025-07-22
5+
done: false
6+
---
7+
- Static Parameters required instance reboot, dynamic is applied instanty
8+
- Group of parameters to apply to the DB engine
9+
10+
# Static vs Dynamic Parameters
11+
- When you associate a new DB parameter group with a DB instance, the modified static parameters are applied only after the **DB instance or the cluster** is rebooted.
12+
- **However**, if you modify dynamic parameters in the DB parameter group after you associate it with the DB instance, these changes are applied immediately without a reboot.
13+
# Parameter groups's ApplyMethod
14+
-

aws/database/rds - proxy.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
tags:
3+
type:
4+
date: 2025-07-22
5+
done: false
6+
---
7+
- Maintains the connection pool for us
8+
- Supports Auto Scaling for connections
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
tags:
3+
type:
4+
date: 2025-07-22
5+
done: false
6+
---
7+
- Upto 15 read replicas
8+
- Within AZ, Cross AZ or Cross Regional
9+
- Replication is **Async**, from the Master (eventually consistent)
10+
- Read Replicas can be promoted to be a own DB? Gets out of Replication
11+
- Application must update the conn string to leverage read replicas
12+
- Only select operation is allowed, not delete, insert, update
13+
- **Use Case** - Take away load from prod db, for external workload. And it is async. Eg, analytics.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
tags:
3+
type:
4+
date: 2025-07-22
5+
done: false
6+
---
7+
**Backups**
8+
- Backups are continous and point in time recovery
9+
- Backups have retentions period 0-35 days, 0 means disabled
10+
- Backups happens during maintanence windows
11+
- Backups uses EBS snapshot behind the scenes?
12+
**Snapshots**
13+
- Snapshots takes IO operation
14+
- In multi az, snapshots will be done on the master databse
15+
- Snapshots are incremental
16+
- Snapshots can be copied and shared across accounts
17+
- Don't expire
18+
- Final snapshot when DB is deleted
19+
# Snapshot Sharing
20+
- If the snapshot is encrypted, the CMK has to be shared
21+
22+
Why have both? Both does the same thing?
23+
One is managed, another is manual and preemptive
24+
25+
![[single-to-multi-az.jpeg]]

0 commit comments

Comments
 (0)