diff --git a/pages/deployment/benchmarking-memgraph.mdx b/pages/deployment/benchmarking-memgraph.mdx index fbee1cb77..015b7f809 100644 --- a/pages/deployment/benchmarking-memgraph.mdx +++ b/pages/deployment/benchmarking-memgraph.mdx @@ -62,7 +62,7 @@ While `mgbench` gives you full control over benchmarking and produces raw result analyzing performance metrics at scale can be time-consuming. That’s why we created [**Benchgraph**](https://github.com/memgraph/benchgraph)—a companion visualization tool for `mgbench`. -![](/pages/memgraph-in-production/benchmarking-memgraph/benchgraph-snippet.png) +![](/pages/deployment/benchmarking-memgraph/benchgraph-snippet.png) Benchgraph is not required to use `mgbench`, but it offers a **convenient way to visualize and explore** benchmark results across a variety of run conditions: diff --git a/pages/deployment/workloads.mdx b/pages/deployment/workloads.mdx index 83202ddf6..1cec2fdf2 100644 --- a/pages/deployment/workloads.mdx +++ b/pages/deployment/workloads.mdx @@ -47,12 +47,16 @@ Scale your write throughput while keeping up with fast-changing, high-velocity g ### [Memgraph in GraphRAG use cases](/deployment/workloads/memgraph-in-graphrag) Learn how to optimize Memgraph for Retrieval-Augmented Generation (RAG) systems using graph data. +### [Memgraph in supply chain](/deployment/workloads/memgraph-in-supply-chain) +Use Memgraph for root-cause analysis, what‑if impact analysis, constraint-based pathfinding, and many more other use cases across your supply chain network. + +### [Memgraph in fraud detection](/deployment/workloads/memgraph-in-fraud-detection) +Deploy Memgraph for real-time scoring, fraud ring discovery, and investigator workflows at scale. + ## 🚧 Guides in construction - Memgraph in transactional workloads - Memgraph in analytical workloads - Memgraph in mission critical workloads -- Memgraph in supply chain use cases -- Memgraph in fraud detection use cases If you'd like to help us **prioritize** this content, feel free to reach out on [Discord](https://discord.gg/memgraph)! diff --git a/pages/deployment/workloads/_meta.ts b/pages/deployment/workloads/_meta.ts index d091f6364..a1f72aded 100644 --- a/pages/deployment/workloads/_meta.ts +++ b/pages/deployment/workloads/_meta.ts @@ -2,4 +2,7 @@ export default { "memgraph-in-cybersecurity": "Memgraph in cybersecurity", "memgraph-in-graphrag": "Memgraph in GraphRAG use cases", "memgraph-in-high-throughput-workloads": "Memgraph in high-throughput workloads", + "memgraph-in-mission-critical-workloads": "Memgraph in mission critical workloads", + "memgraph-in-supply-chain": "Memgraph in supply chain", + "memgraph-in-fraud-detection": "Memgraph in fraud detection", } diff --git a/pages/deployment/workloads/memgraph-in-cybersecurity.mdx b/pages/deployment/workloads/memgraph-in-cybersecurity.mdx index 88a591148..8028f4afe 100644 --- a/pages/deployment/workloads/memgraph-in-cybersecurity.mdx +++ b/pages/deployment/workloads/memgraph-in-cybersecurity.mdx @@ -50,7 +50,7 @@ Here's why Memgraph is a great fit for cybersecurity use cases: While many graph databases **max out around 1,000 events per second**, Memgraph can handle **up to 50x more** (see image below), making it ideal for **high-velocity security event processing**. - ![](/pages/memgraph-in-production/benchmarking-memgraph/realistic-workload.png) + ![](/pages/deployment/benchmarking-memgraph/realistic-workload.png) - **Non-blocking reads and writes with MVCC**: Built on multi-version concurrency control (MVCC), Memgraph ensures that **security event ingestion doesn't block threat analysis** and **analysis doesn't block ingestion**, diff --git a/pages/deployment/workloads/memgraph-in-fraud-detection.mdx b/pages/deployment/workloads/memgraph-in-fraud-detection.mdx new file mode 100644 index 000000000..fcc2d38c4 --- /dev/null +++ b/pages/deployment/workloads/memgraph-in-fraud-detection.mdx @@ -0,0 +1,149 @@ +--- +title: Memgraph in fraud detection +description: Suggestions on how to bring your Memgraph to production in fraud detection and anti-abuse use cases. +--- + +import { Callout } from 'nextra/components' +import { CommunityLinks } from '/components/social-card/CommunityLinks' + +# Memgraph in fraud detection + + +Before diving into this guide, we recommend starting with the [Deployment best practices](/deployment/best-practices) +page. It provides foundational, use-case-agnostic advice for deploying Memgraph in production. + +This guide builds on that foundation, offering additional recommendations tailored to fraud detection and anti-abuse workloads. +In cases where guidance overlaps, consider the information here as complementary or overriding, depending on the +unique needs of your use case. + + +## Is this guide for you? + +This guide is for you if you're building real-time **fraud detection**, **anti-money laundering (AML)**, or **account abuse** systems. +You'll benefit from this content if: + +- You need to **detect anomalies in real time** across transactions, devices, identities, and merchants. +- You want to uncover **multi-hop fraud rings** (e.g., money mules, collusion networks, synthetic identities) and **account takeover cascades**. +- You plan to run **what‑if tests** to evaluate new rules, thresholds, and investigation workflows before rollout. +- You ingest high-velocity events from **payments/auth logs/identity services** and require consistent read performance while updates stream in. +- You need to correlate evidence across systems for **investigation and case management**. + +## Why choose Memgraph for fraud detection? + +- **In-memory architecture**: Consistent, predictable response times for scoring, alerting, and investigator tooling. +- **Graph algorithms (MAGE)**: Use community detection, node similarity, centralities, and more to **infer hidden structure and risk signals** (e.g., collusion clusters, mule networks, synthetic identities). Explore the [available algorithms](/advanced-algorithms/available-algorithms). +- **Streaming/dynamic algorithms**: Keep results fresh on **high‑velocity data** with online/dynamic algorithms that update incrementally (e.g., online centralities). See [dynamic graph algorithms](/advanced-algorithms/available-algorithms#dynamic-graph-algorithms-enterprise). +- **GNNs and ML on graph topology**: Leverage graph-native topology for **GNNs** (e.g., node classification, link prediction) and combine **embeddings** with graph algorithms to improve fraud detection accuracy over tabular‑only baselines. + + +## What is covered? + +The suggestions for fraud detection workloads complement several key sections in the +[general suggestions guide](/deployment/best-practices). These sections offer important context and +additional best practices tailored for performance, stability, and scalability in production: + +- [Choosing the right Memgraph flag set](/deployment/best-practices#choosing-the-right-memgraph-flag-set) + Configure flags for schema access. + +- [Choosing the right Memgraph storage mode](/deployment/best-practices#choosing-the-right-memgraph-storage-mode) + Select between transactional durability and multithreaded ingestion for your workload. + +- [Optimizing fraud detection](#optimizing-fraud-detection) + Use deep path traversals, map properties, and nested indices. + +- [Enterprise features you might require](#enterprise-features-you-might-require) + Secure multi-user environments and ensure governance. + +## Choosing the right Memgraph flag set + +If you plan to power natural-language interfaces for investigators (see GraphRAG below), enable constant-time schema retrieval: + +```bash +--schema-info-enabled=true +``` + +This drastically reduces time to provide schema to an LLM, improving responsiveness. + +## Choosing the right Memgraph storage mode + +Most finance and fraud workloads are inherently **transactional** (safety-critical decisions, auditability, recoverability). As a default, +we recommend running in `IN_MEMORY_TRANSACTIONAL` mode to ensure **ACID guarantees**, support for **replication/HA**, and **WAL/snapshot** durability. + +Consider `IN_MEMORY_ANALYTICAL` only for specialized pipelines focused on **bulk/multithreaded ingestion** and **read-only analytics/simulations** where transactional rollback isn’t required. +Another suitable flow for using analytical is during import, after which the user will switch to `IN_MEMORY_TRANASCTIONAL` mode for ensuring data consistency during the batch update process day-to-day. + +Learn more about storage modes in the [Storage memory usage](/fundamentals/storage-memory-usage#storage-modes) documentation. + +## Enterprise features you might require + +- **Role-based and label-based access control (RBAC/LBAC)** + Ensure least-privilege access across analysts, SOC teams, and external partners. See + [Role-based access control](/database-management/authentication-and-authorization/role-based-access-control). + +- **Replication and high availability** + Keep scoring and investigations online with leader–replica setups and automatic failover. See + [High availability](/clustering/high-availability) and [Replication](/clustering/replication). + +- **Multi-tenancy** + Isolate per product, region, or use case. See [Multi-tenancy](/database-management/multi-tenancy). + +- **Single sign-on (SSO) for Memgraph Lab** + Streamline secure access for your fraud investigators and stakeholders. See [Single sign-on](/memgraph-lab/features/single-sign-on). + +- **Audit logs** + Track access and changes for compliance and investigations. See [Audit log](/database-management/enabling-memgraph-enterprise#audit-log). + +- **Query sharing for collaboration** + Enable investigators to share queries and findings seamlessly. See [Sharing features](/database-management/enabling-memgraph-enterprise#sharing-features). + +## Working with fraud detection + +There are three complementary ways to build fraud detection on Memgraph: + +### 1) Basic pattern matching in Cypher +Use Cypher to encode rules and patterns directly over the graph: +- Variable‑length paths for multi‑hop patterns (e.g., mule chains, shared devices) +- Property/time filters for velocity and windowing +- Negative patterns (absence of expected relationships) + +```cypher +// Example: shared device across multiple accounts in a short window +MATCH (d:Device)<-[:USED_DEVICE]-(a:Account)-[:PERFORMED]->(tx:Txn) +WHERE tx.ts >= $from AND tx.ts < $to +WITH d, collect(DISTINCT a) AS accounts +WHERE size(accounts) >= $minAccounts +RETURN d, accounts; +``` + +### 2) Graph algorithms (MAGE) +Compute risk signals by scoring topology. Commonly useful algorithms include: +- [Katz centrality](/advanced-algorithms/available-algorithms/katz_centrality) +- [Degree centrality](/advanced-algorithms/available-algorithms/degree_centrality) +- [Community detection](/advanced-algorithms/available-algorithms/community_detection) +- [PageRank](/advanced-algorithms/available-algorithms/pagerank) +- [Betweenness centrality](/advanced-algorithms/available-algorithms/betweenness_centrality) +- [Node similarity](/advanced-algorithms/available-algorithms/node_similarity) + +Browse more in [Available algorithms](/advanced-algorithms/available-algorithms). Many also have online/dynamic variants (e.g., [pagerank_online](/advanced-algorithms/available-algorithms/pagerank_online), [katz_centrality_online](/advanced-algorithms/available-algorithms/katz_centrality_online)) for high‑velocity data. + +### 3) Machine learning on graphs +Leverage graph structure and embeddings to train models: +- Supervised GNNs: [GNN node classification](/advanced-algorithms/available-algorithms/gnn_node_classification), [GNN link prediction](/advanced-algorithms/available-algorithms/gnn_link_prediction) +- Unsupervised embeddings: [node2vec](/advanced-algorithms/available-algorithms/node2vec), [node2vec_online](/advanced-algorithms/available-algorithms/node2vec_online) + +Combine ML features (embeddings, graph algorithm scores, rule outputs) into your fraud scoring pipeline to maximize precision/recall. + + +## Interact with your fraud graph using GraphRAG + +Enable natural-language interaction for triage and investigations with GraphRAG and GraphChat in Memgraph Lab. +This helps non-technical stakeholders quickly ask: “Is user X linked to known fraud rings?” or “Show connections between these accounts in the last 30 days.” + +- See: [Memgraph in GraphRAG use cases](/deployment/workloads/memgraph-in-graphrag) +- Include constant-time schema retrieval in your pipeline: + +```cypher +SHOW SCHEMA INFO; +``` + + \ No newline at end of file diff --git a/pages/deployment/workloads/memgraph-in-graphrag.mdx b/pages/deployment/workloads/memgraph-in-graphrag.mdx index 086ec6fe6..b09a74c05 100644 --- a/pages/deployment/workloads/memgraph-in-graphrag.mdx +++ b/pages/deployment/workloads/memgraph-in-graphrag.mdx @@ -43,7 +43,7 @@ Here's what makes Memgraph a perfect fit for GraphRAG: ## What is covered? The suggestions for GraphRAG use cases **complement** several key sections in the -[general suggestions guide](/memgraph-in-production/general-suggestions). These sections offer important context and +[general suggestions guide](/deployment/best-practices). These sections offer important context and additional best practices tailored for performance, stability, and scalability in GraphRAG systems: - [Hardware sizing](#hardware-sizing) diff --git a/pages/deployment/workloads/memgraph-in-high-throughput-workloads.mdx b/pages/deployment/workloads/memgraph-in-high-throughput-workloads.mdx index ee289d0f0..44bc35927 100644 --- a/pages/deployment/workloads/memgraph-in-high-throughput-workloads.mdx +++ b/pages/deployment/workloads/memgraph-in-high-throughput-workloads.mdx @@ -45,7 +45,7 @@ Here's why Memgraph is a great fit for high-throughput use cases: While many graph databases **max out around 1,000 writes per second**, Memgraph can handle **up to 50x more** (see image below), making it ideal for **high-velocity, write-intensive workloads**. - ![](/pages/memgraph-in-production/benchmarking-memgraph/realistic-workload.png) + ![](/pages/deployment/benchmarking-memgraph/realistic-workload.png) - **Non-blocking reads and writes with MVCC**: Built on multi-version concurrency control (MVCC), Memgraph ensures that **writes don’t block reads** and **reads don’t block writes**, allowing each to scale independently. @@ -71,7 +71,7 @@ Here's why Memgraph is a great fit for high-throughput use cases: ## What is covered? The suggestions for high-throughput workloads **complement** several key sections in the -[general suggestions guide](/memgraph-in-production/general-suggestions). These sections offer important context and +[best practices guide](/deployment/best-practices). These sections offer important context and additional best practices tailored for performance, stability, and scalability in high-throughput systems: - [Choosing the right Memgraph flag set](#choosing-the-right-memgraph-flag-set)
diff --git a/pages/deployment/workloads/memgraph-in-mission-critical-workloads.mdx b/pages/deployment/workloads/memgraph-in-mission-critical-workloads.mdx new file mode 100644 index 000000000..490a40224 --- /dev/null +++ b/pages/deployment/workloads/memgraph-in-mission-critical-workloads.mdx @@ -0,0 +1,164 @@ +--- +title: Memgraph in mission-critical workloads +description: Suggestions on how to bring your Memgraph to production in mission-critical and high-availability workloads. +--- + +import { Callout } from 'nextra/components' +import { CommunityLinks } from '/components/social-card/CommunityLinks' + +# Memgraph in mission-critical workloads + + +👉 **Start here first** +Before diving into this guide, we recommend starting with the [**Best practices**](/deployment/best-practices) +page. It provides **foundational, use-case-agnostic advice** for deploying Memgraph in production. + +This guide builds on that foundation, offering **additional recommendations tailored to critical and high-availability workloads**. +In cases where guidance overlaps, consider the information here as **complementary or overriding**, depending +on the unique needs of your use case. + + +## Is this guide for you? + +This guide is for you if you're building **mission-critical systems** where uptime, data consistency, and fault tolerance are essential. +You’ll benefit from this content if: + +- 🛡️ You require **high availability** and **automatic failover** for your application. +- 🔒 You need **strong consistency guarantees** even under heavy loads. +- 🔁 You must **recover gracefully** from unexpected failures without data loss. +- 🏢 You need to **support multi-tenant environments** securely across multiple projects or customers. + +If this matches your needs, this guide will help you configure and operate Memgraph to meet the demands of **always-on production environments**. + +## Why choose Memgraph for mission-critical use cases? + +When stability, consistency, and resilience matter most, Memgraph is built to deliver. Here's why Memgraph is a great fit for mission-critical workloads: + +- **In-memory storage engine with persistence** + Memgraph keeps the working set fully in memory for fast access, while ensuring **durability** through **periodic snapshots** and **write-ahead logging (WALs)** in transactional mode. + Keeping the data in memory ensures lightning speed in times when you expect everything to function seamlessly and without issues during peak times of your critical service. + +- **High availability with automatic failover** + Memgraph supports full [**high availability clustering**](/clustering/high-availability), allowing you to deploy **multiple instances** with automatic **leader election** and **failover** when needed. + Deploying Memgraph with high availability will ensure Memgraph is up and running at all times, without compromising uptime of your services. + +- **Multi-version concurrency control (MVCC)** + Built on **MVCC**, Memgraph allows **non-blocking reads and writes**, ensuring that your system remains **responsive** even under concurrent access. Writes are not blocking reads, and vice versa. + +- **Snapshot isolation by default** + Memgraph uses **snapshot isolation** instead of **read-committed** isolation, preventing dirty reads and guaranteeing a **consistent view** of the graph at all times. + +- **Replication for read scaling and redundancy** + Memgraph supports **asynchronous replication**, enabling you to **scale read workloads** independently while ensuring **failover readiness**. For a more consistent view of the data, it + also supports **synchronous replication** which prioritizes consistency over scalability. + +- **Fine-grained access control and security** + Secure your system with [**role-based access control**](/database-management/authentication-and-authorization/role-based-access-control) and + [**label-based access control**](/database-management/authentication-and-authorization/role-based-access-control#label-based-access-control) to ensure only the right users see and manipulate data. + +## What is covered? + +The suggestions for mission-critical workloads **complement** several key sections in the +[general suggestions guide](/deployment/best-practices), with additional best practices to ensure uptime and data protection: + +- [Choosing the right Memgraph flag set](#choosing-the-right-memgraph-flag-set) + Memgraph offers flags to enhance recovery, snapshot management, and failover capabilities. + +- [Choosing the right Memgraph storage mode](#choosing-the-right-memgraph-storage-mode) + Guidance on selecting the **safest** and **most consistent** storage configurations. + +- [Enterprise features you might require](#enterprise-features-you-might-require) + Overview of **replication**, **multi-tenancy**, and **automatic failover** tools that are critical in production. + +- [Backup and recovery mechanisms](#backup-and-recovery-mechanisms) + Best practices to protect your data through snapshots, WALs, and external backup strategies. + +- [Queries that best suit your workload](#queries-that-best-suit-your-workload) + Designing queries that maintain consistent, safe, and predictable behavior in high-availability systems. + +## Choosing the right Memgraph flag set + +For mission-critical setups, you should configure Memgraph to optimize for **durability, fast recovery**, and **stability**. Some important flags include: + +- `--storage-snapshot-interval-sec=x` + Set how often snapshots are created. In mission-critical systems, you may want **frequent snapshots** to minimize recovery time. + +- `--storage-wal-enabled=true` + Ensure **WALs (write-ahead logs)** are enabled to protect all transactions between snapshots. + +- `--storage-parallel-schema-recovery=true` and `--storage-recovery-thread-count=x` + Enable **parallel recovery** to speed up startup time after a crash by using multiple cores. + +- `--query-execution-timeout-sec=x` + Set reasonable query timeouts to **avoid stuck queries** and prevent resource exhaustion.` + +## Choosing the right Memgraph storage mode + +For mission-critical deployments: + +- Always use `IN_MEMORY_TRANSACTIONAL` mode. +- This mode provides **full ACID guarantees**, **WAL support**, and **snapshot consistency**. + + +`IN_MEMORY_ANALYTICAL` is optimized for high-speed ingestion but does **not provide transactional durability**. It is not recommended for mission-critical workloads. + + +## Importing mechanisms +Importing mechanisms are best described in the [guide for high-throughput workloads](/deployment/workloads/memgraph-in-high-throughput-workloads). +The rule of thumb is to always setup the drivers to perform retries if you're doing heavy amount of writes, in order to avoid read conflicts. +The high throguhput guide also outlines the need for idempotent queries, to ensure data consistency if writes fail for any reason. + +## Enterprise features you might require + +For robust production environments, consider enabling: + +- **High availability clustering** ([learn more](/clustering/high-availability)) + Deploy multiple Memgraph instances with automatic leader election and failover. + +- **Replication for resilience** + Distribute replicas geographically or across availability zones to minimize the risk of localized outages. + +- **Role-based and label-based access control** ([learn more](/database-management/authentication-and-authorization/role-based-access-control)) + Protect sensitive graph data and ensure only authorized operations are performed. + +- **Multi-tenancy** ([learn more](/database-management/multi-tenancy)) + Securely isolate data and permissions between different teams, projects, or customers. + +## Backup and recovery mechanisms + +Data durability is critical in mission-critical environments. Memgraph supports: + +- **Snapshots** + Automatically or manually triggered full-database snapshots. + +- **Write-ahead logging (WALs)** + Transaction logs that enable you to **replay changes** made after the last snapshot. + +- **Manual backup and offloading** + Use external tools (like [`rclone`](https://rclone.org/)) to back up snapshots and WALs to **cloud storage** or **remote servers** for additional redundancy. + + +Memgraph currently does not automate backing up data to 3rd party locations, so integrating a backup process into your +system is highly recommended. + + + +Learn more about backup and restore [on our backup and restore documentation page](/database-management/backup-and-restore). + + +## Queries that best suit your workload + +In mission-critical workloads: + +- Prefer **idempotent writes** (`MERGE`) to avoid inconsistent state during retries. +- Optimize long-running queries and **profile** them regularly ([learn more](/querying/clauses/profile)). +- Avoid complex, unpredictable queries inside critical transactional paths. +- Use **schema constraints** and **indexes** wisely to enforce data integrity without hurting performance. + +Example of safe, idempotent data ingestion: + +```cypher +MERGE (n:Customer {id: $id}) +SET n += $props; +``` + diff --git a/pages/deployment/workloads/memgraph-in-supply-chain.mdx b/pages/deployment/workloads/memgraph-in-supply-chain.mdx new file mode 100644 index 000000000..3d7273df3 --- /dev/null +++ b/pages/deployment/workloads/memgraph-in-supply-chain.mdx @@ -0,0 +1,157 @@ +--- +title: Memgraph in supply chain +description: Suggestions on how to bring your Memgraph to production in supply chain use cases. +--- + +import { Callout } from 'nextra/components' +import { CommunityLinks } from '/components/social-card/CommunityLinks' + +# Memgraph in supply chain + + +Before diving into this guide, we recommend starting with the [Deployment best practices](/deployment/best-practices) +page. It provides foundational, use-case-agnostic advice for deploying Memgraph in production. + +This guide builds on that foundation, offering additional recommendations tailored to supply chain workloads. +In cases where guidance overlaps, consider the information here as complementary or overriding, depending on the +unique needs of your use case. + + +## Is this guide for you? + +This guide is for you if you're operating a supply chain network where visibility, optimization, and resilience are critical. +You'll benefit from this content if: + +- You need to perform **root-cause analysis** across your supply chain to identify **bottlenecks and delays** (e.g., why an order is late, which supplier/route/warehouse is the cause). +- You want to run **impact analysis (what‑if scenarios)** to evaluate downstream effects of investing in your topology, or changing the configuration and behaviour of your assets, without compromising the original graph structure. +- You need **multi-hop pathfinding** with complex business logic routing capabilities. +- You want to maintain a **digital twin** of your supply chain to track and monitor changes in real-time with an observability system. +- You ingest events from **ERP/IoT** systems and need consistent read performance while updates are continuously applied. + +## Why choose Memgraph for supply chain use cases? + +- **In-memory architecture**: Delivers consistent, predictable response times for interactive planning, diagnostics, and operational dashboards. +- **Path traversals with advanced filtering**: Memgraph’s deep path traversal capabilities provide superior, flexible pathfinding with + rich filtering, hop limits, and custom cost functions—ideal for complex business constraints like capacity, carrier rules, and time windows. Learn more in the + [Deep path traversal algorithms](/advanced-algorithms/deep-path-traversal). +- **Non-blocking reads and writes (MVCC)**: Ensure planners and operators get fast insights while real-time updates flow from upstream systems. +- **Snapshot isolation by default**: Guarantees consistent views of the network for reproducible analysis and decision-making. +- **Fine-grained access control (RBAC and label-based)**: Enforce privilege access for planners, partners, and vendors so users only see what they should. +- **Graph visualization (Memgraph Lab)**: Focus your experts on the relevant subgraph with tailored views, filters, and layouts to make faster, better decisions. + +## What is covered? + +The suggestions for supply chain workloads complement several key sections in the +[general suggestions guide](/deployment/best-practices). These sections offer important context and +additional best practices tailored for performance, stability, and scalability in production: + +- [Choosing the right Memgraph flag set](/deployment/best-practices#choosing-the-right-memgraph-flag-set) + Optimize runtime behavior for streaming updates and long-running analytics. + +- [Choosing the right Memgraph storage mode](/deployment/best-practices#choosing-the-right-memgraph-storage-mode) + Select between transactional durability and multithreaded ingestion for your workload. + +- [Enterprise features you might require](#enterprise-features-you-might-require) + Secure multi-user environments and ensure governance. + +- [Queries that best suit your workload](#queries-that-best-suit-your-workload) + Keep writes idempotent and design traversal queries for reliability and speed. + +- [Importing mechanisms](#importing-mechanisms) + Plan ingestion from streams and batch sources (ERP/WMS/TMS/IoT). + +## Choosing the right Memgraph flag set + +Supply chain updates often arrive as standardized messages where not every property changes. +To reduce write overhead during high-throughput ingestion, consider: + +```bash +--storage-delta-on-identical-property-update=false +``` + +With this setting, Memgraph creates delta records only for properties that actually changed, improving throughput when many updates repeat existing values. +All available flags are listed in the [Configuration](/database-management/configuration) section. This flag is commonly useful when you're using batch +imports in bulk, or streaming imports where a subset of the properties changes while the rest remain standardized. + +If you plan to power natural-language interfaces for operators and planners (see GraphRAG below), enable constant-time schema retrieval: + +```bash +--schema-info-enabled=true +``` + +This drastically reduces time to provide schema to an LLM, improving responsiveness. + +## Choosing the right Memgraph storage mode + +Supply chain systems vary between operational (durable) and analytical (what‑if, simulations) needs. +Use the mode that best aligns with your requirements: + +- Use `IN_MEMORY_TRANSACTIONAL` if you require **ACID guarantees**, **replication**, or **high availability**. +- Use `IN_MEMORY_ANALYTICAL` if you prioritize **multithreaded ingestion**, **simulations**, or **read-only analytics** where you don’t need transactional rollback. + +Learn more about storage modes in the [Storage memory usage](/fundamentals/storage-memory-usage#storage-modes) documentation. + +## Importing mechanisms + +Memgraph natively integrates with **data streams** (e.g., Kafka) and supports **batch imports**. For multi-source supply chain data (ERP/IoT): + +- Use drivers or native stream integrations for near-real-time updates. +- If you have multiple concurrent writers, use drivers with **retryable (managed) transactions** to handle transient conflicts during bursts. +- Keep ingestion **idempotent** to allow safe replays. + +See [Data streams](/data-streams) and the high-throughput guide’s advice on +[conflicting transactions](/help-center/errors/transactions#conflicting-transactions). + +## Optimizing supply chain analysis + +### Deep path traversals for routing and what‑if analysis +Use deep path traversals to compute feasible routes under complex business rules (capacity, cost, time windows, risk exposure): + +```cypher +// Example: cost-aware pathfinding from a supplier to a store with custom weight +MATCH path=(s:Supplier {id: $supplierId})-[:ROUTES_TO|SUPPLIES*WSHORTEST (r, n | coalesce(r.cost, 1)) total_cost]->(t:Store {id: $storeId}) +RETURN path, total_cost; +``` + +You can filter expansions by properties (e.g., allowed carriers, max lead time, geo restrictions), upper-bound hops, +or composite weights. See +[Deep path traversal algorithms](/advanced-algorithms/deep-path-traversal). + +### Map properties and nested indices +Supply chains often carry rich, semi-structured payloads (e.g., shipment/ASN details, customs data). Store JSON-like maps and index nested fields: + +```cypher +CREATE INDEX ON :Shipment(details.status); +``` + +Nested indices speed up filters like `WHERE shipment.details.status = 'IN_TRANSIT'` without over-normalizing your model. +Learn more about indices in [Indexes](/fundamentals/indexes#label-property-index). + +## Enterprise features you might require + +- **Role-based access control (RBAC) and label-based access control (LBAC)** + Ensure users only access data they are permitted to see—e.g., region-specific planners, vendor portals, or carrier-limited views. Learn more in + [Role-based access control](/database-management/authentication-and-authorization/role-based-access-control). + +- **Replication and high availability** + Keep planning and operational systems online with leader–replica setups and automatic failover. See + [High availability](/clustering/high-availability) and [Replication](/clustering/replication). + +- **Multi-tenancy** + Isolate per business unit, brand, or customer. See [Multi-tenancy](/database-management/multi-tenancy). + +## Interact with your supply chain using GraphRAG + +Out of the box, you can enable natural-language interaction over your supply chain graph using GraphRAG tools and GraphChat in Memgraph Lab. +This is especially useful for non-technical users who want quick answers like “Why is order 12345 late?” or “What’s the cheapest route if port X is congested?” + +- See the dedicated guide: [Memgraph in GraphRAG use cases](/deployment/workloads/memgraph-in-graphrag) +- When integrating with open-source frameworks, include constant-time schema retrieval in your pipeline: + +```cypher +SHOW SCHEMA INFO; +``` + +This helps LLMs construct valid Cypher quickly. + + diff --git a/public/pages/memgraph-in-production/benchmarking-memgraph/benchgraph-snippet.png b/public/pages/deployment/benchmarking-memgraph/benchgraph-snippet.png similarity index 100% rename from public/pages/memgraph-in-production/benchmarking-memgraph/benchgraph-snippet.png rename to public/pages/deployment/benchmarking-memgraph/benchgraph-snippet.png diff --git a/public/pages/memgraph-in-production/benchmarking-memgraph/realistic-workload.png b/public/pages/deployment/benchmarking-memgraph/realistic-workload.png similarity index 100% rename from public/pages/memgraph-in-production/benchmarking-memgraph/realistic-workload.png rename to public/pages/deployment/benchmarking-memgraph/realistic-workload.png