Database | Amazon Neptune Flashcards

1
Q

What is Amazon Neptune?

General

Amazon Neptune | Database

A

Amazon Neptune is a fast, reliable, fully-managed graph database service that makes it easy to build and run applications that work with highly connected datasets. SQL queries for highly connected data are complex and hard to tune for performance. Instead, with Amazon Neptune you can use open and popular graph query languages to execute powerful queries that are easy to write and perform well on connected data. The core of Neptune is a purpose-built, high-performance graph database engine optimized for storing billions of relationships and querying the graph with milliseconds latency. You can use Neptune for graph use cases such as recommendation engines, fraud detection, knowledge graphs, drug discovery, and network security. Amazon Neptune is fully managed and handles the time-consuming tasks such as provisioning, patching, backup, recovery, failure detection and repair. You pay a simple monthly charge for each Amazon Neptune database instance you use. There are no upfront costs or long-term commitments required.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How do I try Amazon Neptune?

General

Amazon Neptune | Database

A

To try Amazon Neptune, request access to the Preview.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What popular graph query languages does Amazon Neptune support?

General

Amazon Neptune | Database

A

Amazon Neptune supports both the open source Apache TinkerPop Gremlin graph traversal language and the W3C standard Resource Description Framework’s (RDF) SPARQL query language.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How can I migrate from an existing Apache TinkerPop Gremlin application to Amazon Neptune?

General

Amazon Neptune | Database

A

Amazon Neptune provides an Apache TinkerPop Gremlin Server that supports both Websocket and REST connections. Once you provision an instance of Amazon Neptune, you can configure your existing TinkerPop application to use the endpoint provided by the service. See also Accessing the Graph via Gremlin.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Do I need to change client drivers to use Amazon Neptune’s Gremlin Server?

General

Amazon Neptune | Database

A

No, Amazon Neptune’s Gremlin server will support clients that are compatible with Apache TinkerPop version 3.3 using both Websocket and REST connections.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How can I migrate from a triple store with a SPARQL endpoint to Amazon Neptune?

General

Amazon Neptune | Database

A

Amazon Neptune provides an HTTP REST endpoint that implements the SPARQL 1.1 Protocol. Once you provision a service instance, you can configure your application to point to the SPARQL endpoint. See also Accessing the Graph via SPARQL.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Do I need to change client drivers to use Amazon Neptune’s SPARQL Endpoint?

General

Amazon Neptune | Database

A

No, Amazon Neptune’s SPARQL endpoint will work with any client that supports the SPARQL 1.1 Protocol.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Is Neptune ACID (Atomicity, Consistency, Isolation, Durability) compliant?

Performance

Amazon Neptune | Database

A

Yes, Neptune is ACID compliant with immediate consistency.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Do I need to create indices on my data with Amazon Neptune?

Performance

Amazon Neptune | Database

A

No, existing graph database users are often forced to try and outguess the vendor implementation. Explicitly maintaining indices is just one aspect of that. Amazon Neptune does not require you to create specific indices to achieve good query performance, and it minimizes the need for such second guessing of the database design.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What types of graph query workloads are optimized to work with Amazon Neptune?

Performance

Amazon Neptune | Database

A

Amazon Neptune is designed to support graph applications that require high throughput and low latency graph queries. With support for up to 15 read replicas, Amazon Neptune can support 100,000s of queries per second.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Does Amazon Neptune perform query optimization?

Performance

Amazon Neptune | Database

A

Yes, Amazon Neptune uses query optimization for both SPARQL queries and Gremlin traversals.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Is Amazon Neptune built on a relational database?

Pricing

Amazon Neptune | Database

A

No, Amazon Neptune is a purpose-built, high-performance graph database engine. Neptune efficiently stores and navigates graph data, and uses a scale-up, in-memory optimized architecture to allow for fast query evaluation over large graphs.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

How much does Amazon Neptune cost?

Pricing

Amazon Neptune | Database

A

Please see our pricing page for current pricing information.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

In which AWS regions is Amazon Neptune available?

Pricing

Amazon Neptune | Database

A

Please see our pricing page for current information on regions and prices.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Amazon Neptune replicates each chunk of my database volume six ways across three Availability Zones. Does that mean that my effective storage price will be three or six times what is shown on the pricing page?

Pricing

Amazon Neptune | Database

A

No. Amazon Neptune’s replication is bundled into the price. You are charged based on the storage your database consumes at the database layer, not the storage consumed in Amazon Neptune’s virtualized storage layer.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What are IOs in Amazon Neptune and how are they calculated?

Hardware and Scaling

Amazon Neptune | Database

A

IOs are input/output operations performed by Amazon Neptune against an SSD-based virtualized storage layer. Every database page read operation counts as one IO. Amazon Neptune issues reads against the storage layer in order to fetch pages not present in the buffer cache. Each page is 16KB in Amazon Neptune.

Amazon Neptune was designed to eliminate unnecessary IO operations in order to reduce costs and to ensure resources are available for serving read/write traffic. Write IOs are only consumed when pushing transaction log records to the storage layer for the purpose of making writes durable. Write IOs are counted in 4KB units. For example, a transaction log record that is 1024 bytes will count as one IO operation. However, concurrent write operations whose transaction log is less than 4KB can be batched together by the Amazon Neptune database engine in order to optimize I/O consumption. Unlike traditional database engines Amazon Neptune never pushes modified database pages to the storage layer, resulting in further IO consumption savings.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

What are the minimum and maximum storage limits of an Amazon Neptune database?

Hardware and Scaling

Amazon Neptune | Database

A

The minimum storage is 10GB. Based on your database usage, your Amazon Neptune storage will automatically grow, up to 64 TB, in 10GB increments with no impact to database performance. There is no need to provision storage in advance.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

How do I scale the compute resources associated with my Amazon Neptune DB Instance?

Backup and Restore

Amazon Neptune | Database

A

You can scale the compute resources allocated to your DB Instance in the AWS Management Console by selecting the desired DB Instance and clicking the Modify button. Memory and CPU resources are modified by changing your DB Instance class.

When you modify your DB Instance class, your requested changes will be applied during your specified maintenance window. Alternatively, you can use the “Apply Immediately” flag to apply your scaling requests immediately. Both of these options will have an availability impact for a few minutes as the scaling operation is performed. Bear in mind that any other pending system changes will also be applied.

19
Q

How do I enable backups for my DB Instance?

Backup and Restore

Amazon Neptune | Database

A

Automated backups are always enabled on Amazon Neptune DB Instances. Backups do not impact database performance.

20
Q

Can I take DB Snapshots and keep them around as long as I want?

Backup and Restore

Amazon Neptune | Database

A

Yes, and there is no performance impact when taking snapshots. Note that restoring data from DB Snapshots requires creating a new DB Instance.

21
Q

If my database fails, what is my recovery path?

Backup and Restore

Amazon Neptune | Database

A

Amazon Neptune automatically maintains 6 copies of your data across 3 Availability Zones and will automatically attempt to recover your database in a healthy AZ with no data loss. In the unlikely event your data is unavailable within Amazon Neptune storage, you can restore from a DB Snapshot or perform a point-in-time restore operation to a new instance. Note that the latest restorable time for a point-in-time restore operation can be up to 5 minutes in the past.

22
Q

What happens to my automated backups and DB Snapshots if I delete my DB Instance?

Backup and Restore

Amazon Neptune | Database

A

You can choose to create a final DB Snapshot when deleting your DB Instance. If you do, you can use this DB Snapshot to restore the deleted DB Instance at a later date. Amazon Neptune retains this final user-created DB Snapshot along with all other manually created DB Snapshots after the DB Instance is deleted. Only DB Snapshots are retained after the DB Instance is deleted (i.e., automated backups created for point-in-time restore are not kept).

23
Q

Can I share my snapshots with another AWS account?

Backup and Restore

Amazon Neptune | Database

A

Yes. Neptune gives you the ability to create snapshots of your databases, which you can use later to restore a database. You can share a snapshot with a different AWS account, and the owner of the recipient account can use your snapshot to restore a DB that contains your data. You can even choose to make your snapshots public – that is, anybody can restore a DB containing your (public) data. You can use this feature to share data between your various environments (production, dev/test, staging, etc.) that have different AWS accounts, as well as keep backups of all your data secure in a separate account in case your main AWS account is ever compromised.

24
Q

Will I be billed for shared snapshots?

Backup and Restore

Amazon Neptune | Database

A

There is no charge for sharing snapshots between accounts. However, you may be charged for the snapshots themselves, as well as any databases you restore from shared snapshots. Learn more about Amazon Neptune pricing.

25
Q

Can I automatically share snapshots?

Backup and Restore

Amazon Neptune | Database

A

We do not support sharing automatic DB snapshots. To share an automatic snapshot, you must manually create a copy of the snapshot, and then share the copy.

26
Q

How many accounts can I share snapshots with?

Backup and Restore

Amazon Neptune | Database

A

You may share manual snapshots with up to 20 AWS account IDs. If you want to share the snapshot with more than 20 accounts, you can either share the snapshot as public, or contact support to increase your quota.

27
Q

In which regions can I share my Amazone Neptune snapshots?

Backup and Restore

Amazon Neptune | Database

A

You can share your Neptune snapshots in all AWS regions where Amazon Neptune is available.

28
Q

Can I share my Amazon Neptune snapshots across different regions?

Backup and Restore

Amazon Neptune | Database

A

No. Your shared Amazon Neptune snapshots will only be accessible by accounts in the same region as the account that shares them.

29
Q

Can I share an encrypted Amazon Neptune snapshot?

High Availability and Replication

Amazon Neptune | Database

A

Yes, you can share encrypted Amazon Neptune snapshots.

30
Q

How does Amazon Neptune improve my database’s fault tolerance to disk failures?

High Availability and Replication

Amazon Neptune | Database

A

Amazon Neptune automatically divides your database volume into 10GB segments spread across many disks. Each 10GB chunk of your database volume is replicated six ways, across three Availability Zones. Amazon Neptune is designed to transparently handle the loss of up to two copies of data without affecting database write availability and up to three copies without affecting read availability. Amazon Neptune storage is also self-healing. Data blocks and disks are continuously scanned for errors and repaired automatically.

31
Q

How does Amazon Neptune improve recovery time after a database crash?

High Availability and Replication

Amazon Neptune | Database

A

Unlike other databases, after a database crash Amazon Neptune does not need to replay the redo log from the last database checkpoint (typically 5 minutes) and confirm that all changes have been applied, before making the database available for operations. This reduces database restart times to less than 60 seconds in most cases. Amazon Neptune moves the buffer cache out of the database process and makes it available immediately at restart time. This prevents you from having to throttle access until the cache is repopulated to avoid brownouts.

32
Q

What kind of replicas does Neptune support?

High Availability and Replication

Amazon Neptune | Database

A

Amazon Neptune supports Read Replicas, which share the same underlying volume as the primary instance. Updates made by the primary are visible to all Amazon Neptune Replicas.

Feature Amazon Neptune Replicas

Number of replicas Up to 15

Replication Type Asynchronous (milliseconds)

Performance impact on primary Low

Act as failover target Yes (no data loss)

Automated failover Yes

33
Q

Can I have cross-region replicas with Amazon Neptune?

High Availability and Replication

Amazon Neptune | Database

A

No, Amazon Neptune does not support cross-region replicas.

34
Q

Can I prioritize certain replicas as failover targets over others?

High Availability and Replication

Amazon Neptune | Database

A

Yes. You can assign a promotion priority tier to each instance on your cluster. When the primary instance fails, Amazon Neptune will promote the replica with the highest priority to primary. If there is contention between 2 or more replicas in the same priority tier, then Amazon Neptune will promote the replica that is the same size as the primary instance.

35
Q

Can I modify priority tiers for instances after they have been created?

High Availability and Replication

Amazon Neptune | Database

A

You can modify the priority tier for an instance at any time. Simply modifying priority tiers will not trigger a failover.

36
Q

Can I prevent certain replicas from being promoted to the primary instance?

High Availability and Replication

Amazon Neptune | Database

A

You can assign lower priority tiers to replicas that you don’t want promoted to the primary instance. However, if the higher priority replicas on the cluster are unhealthy or unavailable for some reason, then Amazon RDS will promote the lower priority replica.

37
Q

How can I improve upon the availability of a single Amazon Neptune database?

High Availability and Replication

Amazon Neptune | Database

A

You can add Amazon Neptune Replicas. Amazon Neptune Replicas share the same underlying storage as the primary instance. Any Amazon Neptune Replica can be promoted to become primary without any data loss and therefore can be used for enhancing fault tolerance in the event of a primary DB Instance failure. To increase database availability, simply create 1 to 15 replicas, in any of 3 AZs, and Amazon Neptune will automatically include them in failover primary selection in the event of a database outage.

38
Q

What happens during failover and how long does it take?

High Availability and Replication

Amazon Neptune | Database

A

Failover is automatically handled by Amazon Neptune so that your applications can resume database operations as quickly as possible without manual administrative intervention.

If you have an Amazon Neptune Replica, in the same or a different Availability Zone, when failing over, Amazon Neptune flips the canonical name record (CNAME) for your DB primary endpoint to a healthy replica, which is in turn is promoted to become the new primary. Start-to-finish, failover typically completes within 30 seconds. Additionally, the read replicas endpoint doesn’t require any CNAME updates during failover.

If you do not have an Amazon Neptune Replica (i.e. single instance), Neptune will first attempt to create a new DB Instance in the same Availability Zone as the original instance. If unable to do so, Neptune will attempt to create a new DB Instance in a different Availability Zone. From start to finish, failover typically completes in under 15 minutes.

Your application should retry database requests in the event of connection loss.

39
Q

If I have a primary database and an Amazon Neptune Replica actively taking read traffic and a failover occurs, what happens?

High Availability and Replication

Amazon Neptune | Database

A

Amazon Neptune will automatically detect a problem with your primary instance and begin routing your read/write traffic to an Amazon Neptune Replica. On average, this failover will complete within 30 seconds. In addition, the read traffic that your Amazon Neptune Replicas were serving will be briefly interrupted.

40
Q

How far behind the primary will my replicas be?

Security

Amazon Neptune | Database

A

Since Amazon Neptune Replicas share the same data volume as the primary instance, there is virtually no replication lag. We typically observe lag times in the 10s of milliseconds.

41
Q

Can I use Amazon Neptune in Amazon Virtual Private Cloud (Amazon VPC)?

Security

Amazon Neptune | Database

A

Yes, all Amazon Neptune DB Instances must be created in a VPC. With Amazon VPC, you can define a virtual network topology that closely resembles a traditional network that you might operate in your own datacenter. This gives you complete control over who can access your Amazon Neptune databases.

42
Q

Does Amazon Neptune support encrypting my data in transit and at rest?

Security

Amazon Neptune | Database

A

Yes. Amazon Neptune supports encrypting your data in transit using TLS (HTTPS), including the AES-256 cipher suite, to secure the connection between the database instance and the application. This is currently not enabled by default, but can be configured through the cluster parameter group. Amazon Neptune also allows you to encrypt your databases using keys you manage through AWS Key Management Service (KMS). On a database instance running with Amazon Neptune encryption, data stored at rest in the underlying storage is encrypted, as are its automated backups, snapshots, and replicas in the same cluster. Encryption and decryption are handled seamlessly. For more information about the use of KMS with Amazon Neptune, see the Amazon Neptune User Guide.

43
Q

Can I encrypt an existing unencrypted database?

Security

Amazon Neptune | Database

A

Currently, encrypting an existing unencrypted Neptune instance is not supported. To use Amazon Neptune encryption for an existing unencrypted database, create a new DB Instance with encryption enabled and migrate your data into it.