Skip to content

Neptune Serverless vs Provisioned Instance

0

If we have approx 250 M data records for our usecase and we are planning to do analysis in Neptune database/Neptune Analytics which instance type(serverless/provised) will be the best fit and what instance size we should prefer ?

asked 2 years ago895 views

1 Answer
-2

For your use case with approximately 250 million data records, the choice between Neptune Serverless and provisioned instances depends on several factors, including your workload patterns, performance requirements, and cost considerations.

Neptune Serverless is an excellent option if your workload has varying utilization patterns. It can automatically scale compute capacity based on your application's needs, which can be more cost-effective for workloads with fluctuating demands. Serverless instances allow you to set lower and upper limits on compute capacity, measured in Neptune Capacity Units (NCUs). This flexibility can be particularly beneficial if you have periods of high activity followed by periods of low usage.

However, if your workload is more consistent and predictable, a provisioned instance might be more suitable. Provisioned instances provide a fixed amount of compute resources and can be more cost-effective for steady, high-utilization workloads.

For the instance size, considering the volume of your data (250 million records), you'll likely need a significant amount of memory to handle your analytics workload efficiently. The r5 or r6g family of instances would be suitable choices, as they are memory-optimized and designed for database workloads.

If you opt for Neptune Serverless, you could set a minimum NCU that provides memory comparable to an R5 or R6g instance class. For example, you might start with a minimum NCU setting of 16, which corresponds to about 32 GiB of memory (each NCU provides approximately 2 GiB of memory). You can then set a higher maximum NCU to allow for scaling during peak loads.

If you choose a provisioned instance, an r5 or r6g instance with at least 32 GiB of memory (e.g., db.r6g.xlarge or larger) would be a good starting point. You can monitor the performance and adjust as needed.

For Neptune Analytics specifically, which is designed for in-memory analytics on large graphs, you might need even more memory to load and process your entire dataset efficiently. In this case, consider using larger instance sizes or allowing for higher maximum NCUs if using Serverless.

Remember that you can also use a combination of provisioned and serverless instances in the same DB cluster to achieve an optimal cost-performance configuration. This hybrid approach allows you to have a stable base capacity with provisioned instances while leveraging the flexibility of serverless instances for handling variable workloads.

Ultimately, the best choice will depend on your specific query patterns, performance requirements, and budget constraints. It's recommended to start with a configuration that seems appropriate based on these guidelines, monitor your workload's performance and resource utilization, and then adjust as necessary to optimize for your particular use case.
Sources
Choosing instance types for Amazon Neptune - Amazon Neptune
When to use Neptune Analytics and when to use Neptune Database - Neptune Analytics
Capacity scaling in a Neptune Serverless DB cluster - Amazon Neptune

answered 2 years ago

  • The above answer confuses Neptune Database (NDB) and Neptune Analytics (NA). NDB is cluster/instance based where you size based more on the average latency of your queries and amount of concurrency needed by your application. NA is not instance based, but based on mNCUs (memory needed to store a graph). NDB is meant more for OLTP applications, where as NA is for running full graph analytics.

    The choice to use Serverless vs. Provisioned comes down to workload patterns. The following presentation from re:Invent 2023 explains this in detail: https://youtu.be/xAdWa0Ahiok?si=OevgMh6DvJajbVdJ

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.