diff --git a/src/detail/face-impl.hpp b/src/detail/face-impl.hpp
index 5e3558b..e4991ca 100644
--- a/src/detail/face-impl.hpp
+++ b/src/detail/face-impl.hpp
@@ -105,7 +105,7 @@
                        const OnData& onData, const OnTimeout& onTimeout)
   {
     if (!m_face.m_transport->isConnected())
-      m_face.m_transport->connect(*m_face.m_ioService,
+      m_face.m_transport->connect(m_face.m_ioService,
                                   bind(&Face::onReceiveElement, &m_face, _1));
 
     if (!m_face.m_transport->isExpectingData())
@@ -142,7 +142,7 @@
   asyncPutData(const shared_ptr<const Data>& data)
   {
     if (!m_face.m_transport->isConnected())
-      m_face.m_transport->connect(*m_face.m_ioService,
+      m_face.m_transport->connect(m_face.m_ioService,
                                   bind(&Face::onReceiveElement, &m_face, _1));
 
     if (!m_face.m_transport->isExpectingData())
diff --git a/src/face.cpp b/src/face.cpp
index cf2d1e4..dece828 100644
--- a/src/face.cpp
+++ b/src/face.cpp
@@ -32,102 +32,83 @@
 namespace ndn {
 
 Face::Face()
-  : m_internalKeyChain(new KeyChain())
+  : m_internalIoService(new boost::asio::io_service())
+  , m_ioService(*m_internalIoService)
+  , m_internalKeyChain(new KeyChain())
   , m_isDirectNfdFibManagementRequested(false)
   , m_impl(new Impl(*this))
 {
   const std::string socketName = UnixTransport::getDefaultSocketName(m_impl->m_config);
   construct(make_shared<UnixTransport>(socketName),
-            make_shared<boost::asio::io_service>(),
             m_internalKeyChain);
 }
 
-Face::Face(const shared_ptr<boost::asio::io_service>& ioService)
-  : m_internalKeyChain(new KeyChain())
-  , m_isDirectNfdFibManagementRequested(false)
-  , m_impl(new Impl(*this))
-{
-  const std::string socketName = UnixTransport::getDefaultSocketName(m_impl->m_config);
-  construct(make_shared<UnixTransport>(socketName),
-            ioService,
-            m_internalKeyChain);
-}
-
-class NullIoDeleter
-{
-public:
-  void
-  operator()(boost::asio::io_service*)
-  {
-  }
-};
-
 Face::Face(boost::asio::io_service& ioService)
-  : m_internalKeyChain(new KeyChain())
+  : m_ioService(ioService)
+  , m_internalKeyChain(new KeyChain())
   , m_isDirectNfdFibManagementRequested(false)
   , m_impl(new Impl(*this))
 {
   const std::string socketName = UnixTransport::getDefaultSocketName(m_impl->m_config);
   construct(make_shared<UnixTransport>(socketName),
-            shared_ptr<boost::asio::io_service>(&ioService, NullIoDeleter()),
             m_internalKeyChain);
 }
 
 Face::Face(const std::string& host, const std::string& port/* = "6363"*/)
-  : m_internalKeyChain(new KeyChain())
+  : m_internalIoService(new boost::asio::io_service())
+  , m_ioService(*m_internalIoService)
+  , m_internalKeyChain(new KeyChain())
   , m_impl(new Impl(*this))
 {
   construct(make_shared<TcpTransport>(host, port),
-            make_shared<boost::asio::io_service>(),
             m_internalKeyChain);
 }
 
 Face::Face(const shared_ptr<Transport>& transport)
-  : m_internalKeyChain(new KeyChain())
+  : m_internalIoService(new boost::asio::io_service())
+  , m_ioService(*m_internalIoService)
+  , m_internalKeyChain(new KeyChain())
   , m_isDirectNfdFibManagementRequested(false)
   , m_impl(new Impl(*this))
 {
   construct(transport,
-            make_shared<boost::asio::io_service>(),
             m_internalKeyChain);
 }
 
 Face::Face(const shared_ptr<Transport>& transport,
            boost::asio::io_service& ioService)
-  : m_internalKeyChain(new KeyChain())
+  : m_ioService(ioService)
+  , m_internalKeyChain(new KeyChain())
   , m_isDirectNfdFibManagementRequested(false)
   , m_impl(new Impl(*this))
 {
   construct(transport,
-            shared_ptr<boost::asio::io_service>(&ioService, NullIoDeleter()),
             m_internalKeyChain);
 }
 
 Face::Face(shared_ptr<Transport> transport,
            boost::asio::io_service& ioService,
            KeyChain& keyChain)
-  : m_internalKeyChain(nullptr)
+  : m_ioService(ioService)
+  , m_internalKeyChain(nullptr)
   , m_isDirectNfdFibManagementRequested(false)
   , m_impl(new Impl(*this))
 {
   construct(transport,
-            shared_ptr<boost::asio::io_service>(&ioService, NullIoDeleter()),
             &keyChain);
 }
 
 void
 Face::construct(shared_ptr<Transport> transport,
-                shared_ptr<boost::asio::io_service> ioService,
                 KeyChain* keyChain)
 {
   m_nfdController = new nfd::Controller(*this, *keyChain);
 
   m_impl->m_pitTimeoutCheckTimerActive = false;
   m_transport = transport;
-  m_ioService = ioService;
 
-  m_impl->m_pitTimeoutCheckTimer      = make_shared<monotonic_deadline_timer>(ref(*m_ioService));
-  m_impl->m_processEventsTimeoutTimer = make_shared<monotonic_deadline_timer>(ref(*m_ioService));
+  m_impl->m_pitTimeoutCheckTimer      = make_shared<monotonic_deadline_timer>(ref(m_ioService));
+  m_impl->m_processEventsTimeoutTimer = make_shared<monotonic_deadline_timer>(ref(m_ioService));
 
   std::string protocol = "nrd-0.1";
 
@@ -178,8 +159,8 @@
     throw Error("Interest size exceeds maximum limit");
 
   // If the same ioService thread, dispatch directly calls the method
-  m_ioService->dispatch(bind(&Impl::asyncExpressInterest, m_impl,
-                             interestToExpress, onData, onTimeout));
+  m_ioService.dispatch(bind(&Impl::asyncExpressInterest, m_impl,
+                            interestToExpress, onData, onTimeout));
 
   return reinterpret_cast<const PendingInterestId*>(interestToExpress.get());
 }
@@ -213,13 +194,13 @@
   }
 
   // If the same ioService thread, dispatch directly calls the method
-  m_ioService->dispatch(bind(&Impl::asyncPutData, m_impl, dataPtr));
+  m_ioService.dispatch(bind(&Impl::asyncPutData, m_impl, dataPtr));
 }
 
 void
 Face::removePendingInterest(const PendingInterestId* pendingInterestId)
 {
-  m_ioService->post(bind(&Impl::asyncRemovePendingInterest, m_impl, pendingInterestId));
+  m_ioService.post(bind(&Impl::asyncRemovePendingInterest, m_impl, pendingInterestId));
 }
 
 size_t
@@ -363,14 +344,14 @@
 void
 Face::unsetInterestFilter(const RegisteredPrefixId* registeredPrefixId)
 {
-  m_ioService->post(bind(&Impl::asyncUnregisterPrefix, m_impl, registeredPrefixId,
-                         UnregisterPrefixSuccessCallback(), UnregisterPrefixFailureCallback()));
+  m_ioService.post(bind(&Impl::asyncUnregisterPrefix, m_impl, registeredPrefixId,
+                        UnregisterPrefixSuccessCallback(), UnregisterPrefixFailureCallback()));
 }
 
 void
 Face::unsetInterestFilter(const InterestFilterId* interestFilterId)
 {
-  m_ioService->post(bind(&Impl::asyncUnsetInterestFilter, m_impl, interestFilterId));
+  m_ioService.post(bind(&Impl::asyncUnsetInterestFilter, m_impl, interestFilterId));
 }
 
 void
@@ -378,8 +359,8 @@
                        const UnregisterPrefixSuccessCallback& onSuccess,
                        const UnregisterPrefixFailureCallback& onFailure)
 {
-  m_ioService->post(bind(&Impl::asyncUnregisterPrefix, m_impl, registeredPrefixId,
-                         onSuccess, onFailure));
+  m_ioService.post(bind(&Impl::asyncUnregisterPrefix, m_impl, registeredPrefixId,
+                        onSuccess, onFailure));
 }
 
 void
@@ -390,7 +371,7 @@
     if (timeout < time::milliseconds::zero())
       {
         // do not block if timeout is negative, but process pending events
-        m_ioService->poll();
+        m_ioService.poll();
         return;
       }
 
@@ -402,20 +383,20 @@
 
     if (keepThread) {
       // work will ensure that m_ioService is running until work object exists
-      m_impl->m_ioServiceWork = make_shared<boost::asio::io_service::work>(ref(*m_ioService));
+      m_impl->m_ioServiceWork = make_shared<boost::asio::io_service::work>(ref(m_ioService));
     }
 
-    m_ioService->run();
-    m_ioService->reset(); // so it is possible to run processEvents again (if necessary)
+    m_ioService.run();
+    m_ioService.reset(); // so it is possible to run processEvents again (if necessary)
   }
   catch (Face::ProcessEventsTimeout&) {
     // break
     m_impl->m_ioServiceWork.reset();
-    m_ioService->reset();
+    m_ioService.reset();
   }
   catch (...) {
     m_impl->m_ioServiceWork.reset();
-    m_ioService->reset();
+    m_ioService.reset();
     m_impl->m_pendingInterestTable.clear();
     m_impl->m_registeredPrefixTable.clear();
     throw;
@@ -425,7 +406,7 @@
 void
 Face::shutdown()
 {
-  m_ioService->post(bind(&Face::asyncShutdown, this));
+  m_ioService.post(bind(&Face::asyncShutdown, this));
 }
 
 void
diff --git a/src/face.hpp b/src/face.hpp
index 19587dc..abc1d74 100644
--- a/src/face.hpp
+++ b/src/face.hpp
@@ -115,21 +115,6 @@
   /**
    * @brief Create a new Face using the default transport (UnixTransport)
    *
-   * @deprecated This constructor is deprecated.  Use `Face(boost::asio::io_service&)`
-   *             instead.
-   *
-   * @param ioService A shared pointer to boost::io_service object that should control all
-   *                  IO operations
-   * @throws ConfigFile::Error on configuration file parse failure
-   * @throws Face::Error on unsupported protocol
-   */
-  DEPRECATED(
-  explicit
-  Face(const shared_ptr<boost::asio::io_service>& ioService));
-
-  /**
-   * @brief Create a new Face using the default transport (UnixTransport)
-   *
    * @par Usage examples:
    *
    *     Face face1;
@@ -541,34 +526,21 @@
   shutdown();
 
   /**
-   * @brief Get shared_ptr of the IO service object
-   *
-   * @deprecated Use getIoService instead
-   */
-  DEPRECATED(
-  shared_ptr<boost::asio::io_service>
-  ioService())
-  {
-    return m_ioService;
-  }
-
-  /**
    * @brief Get reference to IO service object
    */
   boost::asio::io_service&
   getIoService()
   {
-    return *m_ioService;
+    return m_ioService;
   }
 
 private:
   /**
    * @throws Face::Error on unsupported protocol
-   * @note shared_ptrs are passed by value because ownership is transferred to this function
+   * @note shared_ptr is passed by value because ownership is transferred to this function
    */
   void
   construct(shared_ptr<Transport> transport,
-            shared_ptr<boost::asio::io_service> ioService,
             KeyChain* keyChain);
 
   bool
@@ -591,8 +563,10 @@
   fireProcessEventsTimeout(const boost::system::error_code& error);
 
 private:
-  /// @todo change to regular pointer after #2097
-  shared_ptr<boost::asio::io_service> m_ioService;
+  /// the IO service owned by this Face, could be null
+  unique_ptr<boost::asio::io_service> m_internalIoService;
+  /// the IO service used by this Face
+  boost::asio::io_service& m_ioService;
 
   shared_ptr<Transport> m_transport;
 
